FROM : Bill Cheeseman
DATE : Fri May 02 17:04:39 2008
on 2008-05-02 10:44 AM, Graham Cox at graham.<email_removed> wrote:
> You also need to override -respondsToSelector: and return a logical OR
> of your delegate plus the old delegate's response, something like:
I use this techhnique in my PreFab Event Taps Testbench utility.
I call this the "delegate server" design pattern. In a general sense, it
allows you to control programmatically whether a class "implements" a
delegate method. For example, you could have a preference setting in an
application that turns the delegate methods on or off, or switches between
different sets of delegate methods. The uses for this are probably few, but
it served me perfectly for a test utility that is designed to see how a
variety of applications handle certain system-level facilities with a
variety of delegate method and callback method implementations.
--
Bill Cheeseman - <email_removed>
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
DATE : Fri May 02 17:04:39 2008
on 2008-05-02 10:44 AM, Graham Cox at graham.<email_removed> wrote:
> You also need to override -respondsToSelector: and return a logical OR
> of your delegate plus the old delegate's response, something like:
I use this techhnique in my PreFab Event Taps Testbench utility.
I call this the "delegate server" design pattern. In a general sense, it
allows you to control programmatically whether a class "implements" a
delegate method. For example, you could have a preference setting in an
application that turns the delegate methods on or off, or switches between
different sets of delegate methods. The uses for this are probably few, but
it served me perfectly for a test utility that is designed to see how a
variety of applications handle certain system-level facilities with a
variety of delegate method and callback method implementations.
--
Bill Cheeseman - <email_removed>
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
| Related mails | Author | Date |
|---|---|---|
| Matthew Gertner | May 2, 16:35 | |
| Graham Cox | May 2, 16:44 | |
| Andy Lee | May 2, 16:53 | |
| Andy Lee | May 2, 16:55 | |
| Matthew Gertner | May 2, 16:55 | |
| Matthew Gertner | May 2, 16:56 | |
| Bill Cheeseman | May 2, 17:04 | |
| Graham Cox | May 2, 17:18 |






Cocoa mail archive

