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: |
Description
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)
Change History (6)
Changed 13 years ago by
Attachment: | 7310.patch added |
---|
comment:1 Changed 13 years ago by
Milestone: | tbd → 1.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
comment:3 Changed 13 years ago by
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(); bc.addChild(myChild); bc.startup();
Problem code is in _LayoutWidget.js:
addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){ this.inherited(arguments); this._setupChild(child); },
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
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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 theblock of code at all.
(There's nothing special about BorderContainer; TabContainer etc. have the same issues with initial children vs. added children.)