Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#520 closed defect (fixed)

dojo.widget.Parse dependant on sort order in for(var item in object)

Reported by: fredrik at mumme se Owned by: anonymous
Priority: high Milestone:
Component: Core Version: 0.2
Keywords: Cc:
Blocked By: Blocking:


Currently the dojo.widget.Parse.createComponents iterates in the order that comes from a for(var item in object). Usually this means the same order as items were added to object meaning FirstIn?->FirstOut?. This however isnt guarantied by ECMA specification, and KJS, khtml's javascript engine does not sort items in the same order they came in. This (potentionally) breaks when widgets rely on that a previous widget is created and initialized before.

Like the Tree and TreeController?.

I spent some time tracking down why test_Tree_0.html does'nt work in konqueror 3.5.1 so that when I discovered this behaviour in KJS, I didnt know of this before, sorry...

There is a bug report in

It says that JavascriptCore? has fixed this and that KDE devs are trying out a merged implementation of this.

However it might take a while and maybe it wount be ready until kde 4 comes out, so dojo should probably do a work around.

/ Fredrik

Change History (4)

comment:1 Changed 16 years ago by bill

Version: 0.2

Are you just saying that

for(var item in fragment){

should be replaced by

for(var i=0;i<fragment.length; i++){

var item=fragment[i];


comment:2 Changed 16 years ago by anonymous

Milestone: 0.3release0.4

comment:3 Changed 16 years ago by mumme

Resolution: fixed
Status: newclosed

The KDE folks merged in my patch for this today, kde 3.5.4 is due in August so I think this wont be needed after all.

I'm closing this bug today.

/ Fredrik

comment:4 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.