Opened 14 years ago

Closed 14 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

Change History (3)

comment:1 Changed 14 years ago by fredrik.j at bredband.net

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:2 Changed 14 years ago by schontz@…

Fixed by [1184]

comment:3 Changed 14 years ago by schontz@…

Resolution: fixed
Status: newclosed

I suck at this. :)

Note: See TracTickets for help on using tickets.