Andreas,
I appreciate your input. I see how that would be simple, but I was
looking to avoid redundant variables for objects that can be referenced
programmatically. Maybe there's no penalty for creating a variable to
reference each object in the window, so I can see how this would ease my
development effort. Now that you've suggested it, it seems so obvious
to me. (Thank you, Mr. Obvious!) I have to wonder why the
documentation doesn't offer it as an alternative to the child management
approach in the Custom Widget chapter.
I guess there must be appropriate scenarios for both ways of dealing
with child controls, but I think I'll give the "member" approach a try
unless someone raises a serious concern about large numbers of member
variables within a class file.
Thanks,
Gene
On Sat, 2009-06-13 at 10:17 +0200, Andreas Junghans wrote:
> Hi Gene,
>
> Am 12.06.2009 um 20:01 schrieb Gene Amtower:
>
> > I think typical usage may be more complex than outlined in the
> > existing chapter content, and maybe that's where my understanding
> > met with difficulty. I think the chapter assumes that I'm writing a
> > new widget with a couple of added components. Instead, I'm trying
> > to create a new class that creates and controls a window object
> > within a desktop object.
>
> Maybe I'm missing something obvious, but why don't you just store
> references to all important widgets as simple instance members? You
> can do that at widget creation time:
>
> this.__myWidget1 = ...;
>
> Later, e.g. in a listener, you can just access this.__myWidget1
> instead of navigating through some control hierarchy (which might
> change in the future when you move stuff around). That's a common
> pattern when creating GUIs (not only with qooxdoo). I think there's no
> need to mess with child controls and ids in your use case.
>
> Regards,
>
> Andreas J.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel