user interfaces for samba4 or samba3 configuration

S P sree314 at gmail.com
Mon Sep 4 18:25:01 GMT 2006


On 9/4/06, derrell at samba.org <derrell at samba.org> wrote:

> Yes, it is a bit messy-looking, but that's javascript.  You may be able to
> clean things up a bit by not using anonymous functions: name your functions
> and pass the name to the event handlers.  Just watch your closures to ensure
> that your functions get freed properly when they go out of scope and are no
> longer needed.  (http://www.jibbering.com/faq/faq_notes/closures.html)

I'd like to do this:

txtBox.onclick = somefn()

and have somefn() access to all the UI components and their values,
not just txtBox.
For this, somefn will need to be somewhere where it has scope access
to all the other component variables. That, in my code, is inside the
functions that generate the UI. If I had  a single variable (say of
the main window), on which I could do this like:

mainWindow.txtBox.getValue() or
mainWindow.getComponent("txtBox").getValue()

then life would be easy, and code cleaner :), since only mainWindow
needs to be passed around.

BTW, example 2 in your link does seem to be something I can probably
use, thanks!

> > Any full-fledged apps using qooxdoo that I can look at?
>
> There are a couple of full-fledge applications out there built on qooxdoo.  If
> I can find them, I'll pass along links.

Would really appreciate this.

>In the mean time, there are numerous
> smaller demos ("example" and "test") on the qooxdoo web site and in the source
> distribution that it would probably be worthwhile for you to examine if you
> haven't already.

I have used these examples and tests quite a lot. But they all seem to
follow the same design of assigning functions to events (i.e. inline),
and have trivial inline functions, so they're not of much help.

Sreepathi Pai
____________


More information about the samba-technical mailing list