| To: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
|---|---|
| Subject: | Re: EmbeddedWindowControl/ContainerControl Issue |
| From: | Dennis Birch <dennisbirch@gmail.com> |
| Date: | Thu, 26 Feb 2009 09:04:50 -0800 |
| 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; dkim=neutral (body hash did not verify) header.i=@gmail.com |
| Delivered-to: | listarchive@realsoftware.com |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+0TGKQlQLO10JMNW8HFHvjWh6LaSNhtq59p+gRt2wFw=; b=hYtEC+asMj3z9W+SF9WqxmFHc6Hh4Wl7Vp98HrUaH05gyeJI2aSTK8wYi8w2Dye4rl VB+BphaT7OCf4XwlRxIhNNlCkB+/PezcwXsoqgq1CVFrXtW4HwlQjXRNB8jP+050Lhcz 9tPFj7i+VEvX2kFu2bFbzkbXaIptNfxT85ZFg= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ol7M7KQWSj+5utZvvUpnHD6tllyco0Lr3mA6eMPinJwibVGgVDZaN9fYujgWVNbIZU 4+LJo60iNFLeSPyZGPx2hcBFe6TZDRbMuwekOmffp6SLgJnAeCiJKt4nrSwOz1/0J2/O CTWTr/X9hHY7CcvZM9U0nfHRmFSdg3DcgesME= |
| In-reply-to: | <49A6BB29.4070100@inspiringapps.com> |
| 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> <49A6BB29.4070100@inspiringapps.com> |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
On Thu, Feb 26, 2009 at 7:54 AM, Joe Strout <joe@inspiringapps.com> wrote: > 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. Couldn't you add that same logic to a ContainerControl subclass, along with a single method to invoke it? Then in your loop that looks at all your window's controls you could do something like: if Control(i) isa SmartControlContainer Then LoopOverControls _______________________________________________ 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> |
|---|---|---|
| ||
| Previous by Date: | Re: EmbeddedWindowControl/ContainerControl Issue, Joe Strout |
|---|---|
| Next by Date: | Re: EmbeddedWindowControl/ContainerControl Issue, Dennis Birch |
| Previous by Thread: | Re: EmbeddedWindowControl/ContainerControl Issue, Joe Strout |
| Next by Thread: | Re: EmbeddedWindowControl/ContainerControl Issue, Dennis Birch |
| Indexes: | [Date] [Thread] [Top] [All Lists] |