On Jun 3, 2006, at 11:20 AM, Charles Yeomans wrote:
Passing a reference to the control or window removes the need for a circular reference.

Nice!

You can then implement window behavior as needed in the handler methods. If you need to get the state of other controls in a handler, that's certainly possible. You could do something like CrowdedWindow(b.Window).EditField1.Text. Casting is generally a code smell, but since CrowdedWindowEventHandler is auxiliary to CrowdedWindow, it's a reasonable thing to do in this case.

I guess this is about minimizing nastiness, not eliminating it. Why is this so hard to do beautifully?

Although you have two window classes MacOSCrowdedWindow and WindowsCrowdedWindow, I'm assuming that the behavior is the same, and a CrowdedWindowEventHandler provides that behavior for both windows.

Yes, this is always true.


If I may work in a plug -- in the next issue of RBD I have a column that discusses a similar scheme in the context of implementing a singleton ServerSocket object.



I'll look forward to reading it.

Thanks for all of your suggestions!  Lisa



------------------------------------------
Lisa Sawin
Glass Bead Software
http://www.glassbead.com/

REALbasic 2005 r4 running on Mac OS 10.3.9

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to