Opened 14 years ago

Closed 13 years ago

Last modified 10 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:

Description

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 bugs.kde.org: https://bugs.kde.org/show_bug.cgi?id=28474

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 14 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 14 years ago by anonymous

Milestone: 0.3release0.4

comment:3 Changed 13 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 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.