On 8.03.2011 7:24, Tobias Oetiker wrote:
>> Is this normal?
>
> yes, the Widget object has only a protected add method (_add) if
> you enable the showing of protected methods in the api viewer you
> will see it ...
>
> the idea is that the widget object only provides a minimal set of
> public methods and all other bits (the ones required to populate
> the widget) are protected and you would expose them explicilty if
> so needed (eg if the wiget is going to have the capability to
> contain arbitrary other widgets somewhere inside its makeup).
But then there's a problem with the documentation of the
qx.application.Standalone.getRoot() method. (at least for beginners like
me). I had the following piece of code:
var toolBar = new qx.ui.toolbar.ToolBar();
this.getRoot().add(toolBar, {
left: 0,
top: 0,
right: 0
});
Then I looked at
http://demo.qooxdoo.org/1.3/apiviewer/#qx.application.Standalone
which says (after having clicked the "Inherited" button) that getRoot()
returns a Widget. And then I was confused to not find an add() method in
Widget. OK, I guess that the problem comes because the docstring of
getRoot() is just inherited from AbstractGui which indeed doesn't know
what kind of Widget Standalone.getRoot() will return. And thus I still
don't know what kind of Widget Standalone.getRoot() actually returns.
This is of course only a minor problem in the documentation, which
generally speaking is excellent. Don't take my post as a complain, but
rather as a hint on how to make it even better.
It is even a compliment: only good documentation deserves such nit-picky
suggestions :-)
Luc
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel