Hi,
the best approach is 1) in your list.
the qooxdoo way in that approach goes like this:
- you should declare private variables that will hold reference to your
widgets in the members section.
- in the destruct section of the kardpoll.frmLogin class, you dispose of the
child widgets.
- you can access your child widgets in the class like this:
this.__myChildWidget.doSomething().
- you can add public getter methods in the members section to get access to
your child widgets if you need access to some of your child widgets from
outside of your class:
members : {
getUsernameTextControl : function(){
return this.__myUsernameTextField;
}
}
- it is good practice to initialize these variables to null when you declare
them in the members section, and assign a new instance of the child control
in the constructor.
check out this example from our feedreader application:
http://qooxdoo.svn.sourceforge.net/viewvc/qooxdoo/trunk/qooxdoo/application/feedreader/source/class/feedreader/view/ToolBar.js?revision=28196&view=markup
members :
{
// private members
__removeBtn : null,
__overflowMenu : null,
__menuItemStore : null,
__addBtn : null,
__prefBtn : null,
.........
and the instantiation occurs in the constructor:
this.__prefBtn = new qx.ui.toolbar.Button(this.tr("Preferences"),
"icon/22/apps/preferences-theme.png");
.....
cheers,
Gabi
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/What-is-the-best-practice-for-adding-widgets-to-Containers-tp6596390p6597883.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel