Why is this a problem? There are some functions that you can use to search for
child objects (check the API viewer for getchildren or something similar), if
you wanted to perform the same operation you could consider storing them in
your own array.
What might be best for you depends on your needs. I've created some
"data-aware components" which might be similar to what you are after. I have a
dataset that I can access fields with - ds.fields["username"].getValue() for
example - and then some controls derived textfield that accept a dataset and a
fieldname and automatically update when the field changes and vice versa.

I might be able to help you more if you explained what you doing in more
detail.

Hope this helps,
Matthew

P.S. I'm faily new to the discusion group, what for other people to reply
as-well they might know something I dont

mshillin <[EMAIL PROTECTED]> wrote:

> 
> I am writing an app with data entry forms.  To be able to access the various
> UI components (TextField, Checkbox, etc) from different functions in the
> class, it seems that I need to declare them as class member variables and
> always refer to them with "this" (this.myTextField.getValue()).  
> 
> While this works, is it the preferred way?  In the examples all UI component
> access is done in in-line functions/event-listeners where the UI component
> has scope and use of member variable is not needed.  Looking at the manual,
> there does not seem to be a section about variable scope, member access and
> use of "this".
> 
> Is there anyway to find/access UI components without having them declared as
> members?  
> 
> Currently my code looks like the following;
> 
> ++++++++++++++
> construct : function(){
>   this.base(arguments);
>   this._initLayout();
> },
> 
> member : {
>    myTextField : null;
>   
>    _initLayout : function(){
>       this.myTextField = new qx.ui.form.TextField();
>       this.add(this.myTextField);
>   },
> 
>   getTextValue : function() {
>     return this.myTextField.getValue();
>   }
> }




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to