I run into a really basic question for which I didn't found a satisfactory
answer.

The model of my problem:

I've got a mainContainer which is added to the my custom application's root
(this.getRoot().add(mainContainer)
This mainContainer have two frames, call them frameOne and frameTwo. They
both are instantiated from the same class object: custom.Frame. This Frame
is a container which contains a label and a button.

Here is a visual draft:
http://blok.appspot.com/?id=e9bfcf90a6eab84069c318f29222404b2c925eee

My goal is that when the frameOne.button is pressed I would like to change
the frameTwo.label and vica versa, when the frameTwo.button is pressed I
would like to change the frameOne.label.

How could be achieved the communication between the two frames? 
How will they know about each other? 
How could be given the frameOne.label to the
frameTwo.button.addListener("execute", frameTwo.label.setLabel("button in
another frame is pressed") and vica versa?

Is it possible to handle this kind of communication between instances
without to make my mainFrame a global object or to pass the applications
main "this" to all the constructors which have to reach another existing
objects (this.mainFrame)?
Is there a way to find out the Application itself from an instance of a
class which is inside of my custom package, something like
getApplicationRoot() method?

I hope I could write down my problem cleare enough.
-- 
View this message in context: 
http://n2.nabble.com/OO-programming-theory-question-tp4269104p4269104.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to