alan m wrote:
> That's it, thanks Paul! I guess using this.button = new MyButton();
> makes button a property of MyDiv so I can then use button's methods
> from this class - this.button.addClickListener et.c. Is this
> conceptually correct? I'm still learning OOP as you can tell! ;-)
>
> Much obliged,
> Alanj
>
>
>   
Sort of. You're just keeping a reference to the instance of MyButton
that was created so you can do stuff with it later.  It's not the
*class* that's holding a reference to the instance of MyButton though -
it's the instance of MyDiv that's keeping a reference to the instance of
MyButton.

BTW - This is not the best mail list to use for help learning OOP and
java - though I'm not sure where is!

Paul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to