Opened 17 years ago

Closed 17 years ago

#43 closed defect (fixed)

Object declaration doesnt strip spaces in widget assignment

Reported by: Fredrik Johansson fredrik.j at Owned by: alex
Priority: high Milestone:
Component: General Version:
Keywords: object parsing Cc:
Blocked By: Blocking:


Puzzeling subjectline I now..

What I mean is this:

If I declare a variable in my widgetclass like this

dojo.webui.widgets.Somewidget = function(){ = {bar:0, foo:1};


And then assign like this: <div dojoType="Somewidget" foo="bar:1; foo:2;" />

and then run this in Somewidget::fillInTemplate()


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

I used Firefox 1.0.2 and konqueror 3.4.1, Kubuntu Linux

Hope you understand what I mean

/ Fredrik

Change History (3)

comment:1 Changed 17 years ago by fredrik.j at

Keywords: object parsing added

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

comment:3 Changed 17 years ago by [email protected]

Resolution: fixed
Status: newclosed

I suck at this. :)

Note: See TracTickets for help on using tickets.