[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#22407: javascript arrays of objects with array elements
From:       Harri Porten <harri () trolltech ! com>
Date:       2001-03-18 22:50:51
[Download RAW message or body]

winston@stdout.org wrote:
> 
> Package: kjs
> Version: KDE 2.1.0
> Severity: normal
> Installed from:    RedHat RPMs
> Compiler:          Not Specified
> OS:                Linux
> OS/Compiler notes: Not Specified
> 
> Arrays of objects containing arrays do not work properly in Konqueror.
> 
> The following code gives the output shown below:
> ---------------------
> function test (value){
>     this.value = value;
> }
> 
> ar = new Array();
> ar[0] = new test(new Array("foo"));
> document.writeln("ar[0].value is type " + typeof(ar[0].value) + "<br>\n");
> -----------------------
> ar[0].value is type undefined
> -----------------------
> It should say it is type Object, as it does in Netscape.

This bug is fixed in the current CVS for KDE 2.2. constructor functions
were slightly broken. What happened is that this.value=value returned
value as the result of new. A "return undefined;" might help.

Harri.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic