Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#9470 closed defect (fixed)

The dojox.layout.GridContainer's default constructor does not check for null or undefined properties

Reported by: spidey2099 Owned by: dante
Priority: high Milestone: 1.4
Component: DojoX Layout Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

UseCase? Extend the GridContainer? and construct it without any properties. This is a valid use case since the properties will be added later. Result: An error is thrown to the effect that props has no values.

Examining the constructor showed that it was checking the properties on the assumption they would exist or be defined. This logic is brittle, since there may well be a case when the properties are not defined. In this case, the default properties should be assigned.

Changed the code to handle undefined properties in the constructor.

Attachments (1)

GridContainer.js (31.0 KB) - added by spidey2099 10 years ago.
Changed the grid container's constructor. Please see comment : 6/27/2009 JB: Changed to handle undefined props

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by spidey2099

Attachment: GridContainer.js added

Changed the grid container's constructor. Please see comment : 6/27/2009 JB: Changed to handle undefined props

comment:1 Changed 10 years ago by Adam Peller

Component: GeneralDojox
Owner: changed from anonymous to dante

comment:2 Changed 10 years ago by dante

Milestone: tbd1.4
Status: newassigned

comment:3 Changed 10 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [20170]) fixes #9470 - create a props object if one is not passed. smaller than the attached patch from spidey2099, though thanks for catching this. \!strict

comment:4 Changed 9 years ago by bill

Component: DojoxDojoX Layout
Note: See TracTickets for help on using tickets.