Re: Attachable and observable patterns
Re: Attachable and observable patterns
- Subject: Re: Attachable and observable patterns
- From: John Calsbeek <email@hidden>
- Date: Thu, 14 Jul 2005 17:35:23 -0500
What's the best way to implement attachable and observable patterns
in Cocoa/ObjC?
This is a brand new app for Tiger or later. The basic design is a
pipe-and-filter that processes incoming network packets (normal
app, not a kext or anything). I want to be able to add 0..*
observers or attachments to each stage that can either do stuff
based on or do stuff to the packets as they progress through the
filters.
If I were doing this in Java, I'd be tempted to give each of the
filters a Vector objects that implement Observable or some
interface with an "execute" method, but I suspect I may be missing
something I can get for free in Cocoa that is more efficient.
Delegates and notifications look sort of promising, am I on the
right track? Any particularly beautiful examples of this being done?
I'm a complete Cocoa and ObjC novice, so there is no such thing as
an obvious answer to me right now. Any suggestions are welcome.
For at least the observing part, you may want to take a look at these
pages:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/index.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueObserving/index.html>
-John Calsbeek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden