Opened 14 years ago

Last modified 12 years ago

#5485 closed enhancement

Remove the mandatory requirement for curly braces to surround "constraints" in markup — at Initial Version

Reported by: ptwobrussell Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.0
Keywords: Cc: [email protected]…, [email protected]
Blocked By: Blocking:

Description

I just realized that the constraints attribute for dijits requires use of the curly braces i.e. constraints="{min:0,max:100}" while other stuff outside of dijit does not i.e. djConfig="parseOnLoad:true" I'm slightly confused by why that would be the case because it seem that the behavior should be identical in either case.

The error I'm seeing in Firebug when I don't use the enclosing {} is

SyntaxError?: missing ) in parenthetical message=missing ) in parenthetical.

Test case w/ 1.0.2:

<input dojoType="dijit.form.NumberSpinner" readOnly=true constraints="min:0,max:100" value=0>

Now, with that said, it looks like the documentation actually confirms that curly braces are required, so I realize that I'm not reporting a defect; however, I can't imagine why the syntax would need to differ. Unless there's a compelling technical reason to keep the curly braces, it seems that it would be much better to lose them. When people get used to one kind of syntax in Base and Core, this kind of difference can really trip them up when they come over to dijit.

Change History (0)

Note: See TracTickets for help on using tickets.