realbasic-nug
[Top] [All Lists]

Re: EmbeddedWindowControl/ContainerControl Issue

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: EmbeddedWindowControl/ContainerControl Issue
From: Joe Strout <joe@inspiringapps.com>
Date: Thu, 26 Feb 2009 08:54:17 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <8101E1E9-64A6-4A35-BCF6-C8600016AB2B@declareSub.com>
Organization: Inspiring Applications, Inc.
References: <5D6EE007-73DF-478F-83FD-987D2C1A2009@carboncode.com> <AAAC531A-384A-45C1-A36F-E97BB575C01C@macsos.com.au> <6F46C037-D532-4383-A64A-19047A98697C@mac.com> <AF7CFFBA-921D-4B12-836F-F6A60B471A07@carboncode.com> <39B45585-9820-47E5-8BF6-B5E0EE927B2E@great-white-software.com> <B0C41322-6779-4049-AA8C-CA35581E958A@declareSub.com> <76917D28-9D36-4A54-A249-2A045C74BF37@great-white-software.com> <8101E1E9-64A6-4A35-BCF6-C8600016AB2B@declareSub.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
Charles Yeomans wrote:

I think that identifying ContainerControls and EmbeddedWindowControls only continues to confuse the issue. ContainerControls do not show up in the control list of a window. The associated EmbeddedWindowControl objects do.

That'd be tolerable if there were some way to get from the EmbeddedWindowControl to the ContainerControl, or even if there were some other pair of methods (analogous to ControlCount and Control) that lets you iterate over container controls.

But as far as I can tell, there is not either of these. Container controls show up in a window's "Contents" list in the debugger, but there is no way for our code to get the same list.

This hit home for me just yesterday: I have a window subclass that can do all sorts of automatic things with its contents, such as disabling controls at appropriate times or telling certain kinds of contents to do certain things at the appropriate times. It does this by iterating over the Controls list and using IsA (with class or interface specifiers) as needed to cast and notify each one.

But this strategy comes to a screeching halt as soon as any of those items are a ContainerControl rather than a simple control. There is no way for the window to discover these things among its contents. I have to fall back on declaring some event, which the user must remember to implement, for getting references to that stuff.

I guess it's feature-request time... and meanwhile, I guess I add an event to return a list of container controls. But it's not pretty.


--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com


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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>