Opened 13 years ago

Closed 13 years ago

#7310 closed defect (fixed)

[patch][ccla]BorderContainer: programmatic creation doesn't create splitter

Reported by: bill Owned by: Adam Peller
Priority: high Milestone: 1.2
Component: Dijit Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:


See test_BorderContainer_prog.html.

Pressing "add left pane" button creates a left pane with splitter:true parameter, but yet there's no splitter, and not even a draggable gutter (well, the div is there for a gutter but it's 5x0 so it's not visible.

Attachments (1)

7310.patch (1.7 KB) - added by Adam Peller 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by Adam Peller

Attachment: 7310.patch added

comment:1 Changed 13 years ago by Adam Peller

Milestone: tbd1.2
Summary: BorderContainer: programmatic creation doesn't create splitter[patch][ccla]BorderContainer: programmatic creation doesn't create splitter

comment:2 Changed 13 years ago by bill

I looked over this patch briefly. Seems basically good except that apparently you are setting child._setup = true but never clearing that flag when the child is removed. I don't see a reason to have the

if(child._setup){ return; } 
child._setup = true; 

block of code at all.

(There's nothing special about BorderContainer; TabContainer etc. have the same issues with initial children vs. added children.)

comment:3 Changed 13 years ago by bill

OK, just talked to Adam. Looks like there's a generic problem w/layout widgets where setupChild() is called twice for any child added before startup, ex:

var bc = new BorderContainer();

Problem code is in _LayoutWidget.js:

addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){

I guess that shouldn't call _setupChild() if startup() hasn't been called yet. (Would need to test it though)

comment:4 Changed 13 years ago by Adam Peller

(In [14862]) Move splitter setup to _setupChild so that it is processed for late additions after startup. Refs #7310 !strict

comment:5 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [14866]) Don't call _setupChild twice. Only call from addChild for late additions (after startup) Fixes #7310 !strict

Note: See TracTickets for help on using tickets.