Alexander Back wrote:
> Hi Kenny,
>
> Kenneth Tilton wrote:
>> I tried simply adding the simplest splitpane demo to the widget where I
>> eventually will be splitting two of my widgets. The starting point:
>>
>> addSplitPaneTwoFlexSimple : function()
>> {
>> var splitpane = new qx.ui.splitpane.Pane("horizontal");
>> splitpane.setWidth(400);
>> splitpane.setHeight(60);
>> splitpane.setDecorator("main");
>> this.getRoot().add(splitpane, {left:20, top:20});
>>
>> // Left
>> var leftWidget = new qx.ui.form.TextArea("Flex:1");
>> leftWidget.setDecorator(null);
>> leftWidget.setWrap(true);
>> splitpane.add(leftWidget, 1);
>>
>> // Right
>> var rightWidget = new qx.ui.form.TextArea("Flex:2");
>> rightWidget.setDecorator(null);
>> rightWidget.setWrap(true);
>> splitpane.add(rightWidget, 2);
>> },
> If I simply paste your snippet into the playground application
> everything is working fine. Could you please provide the code for the
> "control"? Maybe we can take a look at this part and find a solution.
>
>> I had to yank the getRoot(). In general, btw, I wish the demos were more
>> conducive to cut/paste. I have run into this before where the code
>> assumed a distinct application (but truth be told in this case I am not
>> sure why the demo needs a getRoot either). Anyway...
> Good point.
> Each demo is a full qooxdoo application, that's the reason why they need
> to use "getRoot".
Maybe you could always drop in one widget deep so demos will plug and
play out into arbitrary nodes in someones app? Just a thought.
Meanwhile...
>
>> Now I get the error "At least one child in control <the guy to which I
>> added the splitpane> requires a layout, but no one was defined!".
>>
>> Immediately after the code to add the splitpane I test hasLayoutChildren
>> on the same guy and it is successful.
> Could you just send over more code to look at? :-)
That was it! :) You reminded me that that error message "one child of X
needs a layout" is issued when I neglect to give X a layout (which
layout had gotten chopped when hacking it in the splitpane.
thx, ken
ps. If my understanding is correct, the error might better be "If X is
not given a layout,..." k
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel