Opened 13 years ago

Closed 13 years ago

#1428 closed defect (fixed)

(TreeV3) expandLevel and loadLevel TreeV3/TreeNodeV3 property values are not converted to integer representations

Reported by: justin@… Owned by: ilia
Priority: high Milestone: 0.9
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

When specifying the expandLevel or loadLevel property for either TreeV3 or TreeNodeV3, it is not properly parsed into an integer representation. Instead, the value is taken as a string. This causes an issue when either of these properties are incremented, such as level+1 in the TreeLoadingControllerV3.expandToLevel method. Instead of being properly incremented (e.g. expandLevel="1" in markup becoming 2 in expandToLevel), it gets concatenated together.

To resolve this issue, I just added:

this.expandLevel = parseInt(this.expandLevel);

this.loadLevel = parseInt(this.loadLevel);

to the initialize methods in TreeV3.js and TreeNodeV3.js.

Change History (3)

comment:1 Changed 13 years ago by bill

Owner: changed from bill to ilia
Version: 0.3

Actually dojo widgets have a different way of declaring the types of parameters; see the "Parameters" section in http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book57 . Not sure why there are declared as "" in the TreeWithNode?.js. Maybe the default should be a sentinel value like -1. Anyway, reassigning to Ilia.

comment:2 Changed 13 years ago by dylan

Milestone: 0.5

comment:3 Changed 13 years ago by ilia

Resolution: fixed
Status: newclosed

Changed to integer

Note: See TracTickets for help on using tickets.