Opened 16 years ago
Closed 16 years ago
#43 closed defect (fixed)
Object declaration doesnt strip spaces in widget assignment
Reported by: | Fredrik Johansson fredrik.j at bredband.net | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | |
Keywords: | object parsing | Cc: | |
Blocked By: | Blocking: |
Description
Puzzeling subjectline I now..
What I mean is this:
If I declare a variable in my widgetclass like this
dojo.webui.widgets.Somewidget = function(){
this.foo = {bar:0, foo:1};
}
And then assign like this: <div dojoType="Somewidget" foo="bar:1; foo:2;" />
and then run this in Somewidget::fillInTemplate()
dj_debug(this.foo.toSource())
prints: {bar:1,foo:1,foo:2}
If I writes this instead: <div dojoType="Somewidget" foo="bar:1;foo:2;" />
I only have {bar:1,foo:2} in this.foo
I used Firefox 1.0.2 and konqueror 3.4.1, Kubuntu Linux
Hope you understand what I mean
/ Fredrik
Note: See
TracTickets for help on using
tickets.
This solves this bug (Hopefully)
Changing line 211 in dojo.webui.widget revision 979
from this:
this[x][pairs[y].substr(0, si)] = pairs[y].substr(si+1);
to this:
this[x][dojo.text.trim(pairs[y].substr(0, si))] = pairs[y].substr(si+1);
/ Fredrik