• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Attachable and observable patterns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attachable and observable patterns


  • Subject: Attachable and observable patterns
  • From: email@hidden
  • Date: Thu, 14 Jul 2005 15:27:14 -0700

Hello list,

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.

Thanks!
  dm

_______________________________________________
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


  • Follow-Ups:
    • Re: Attachable and observable patterns
      • From: John Calsbeek <email@hidden>
  • Prev by Date: Re: Subclassing NSColorWell?
  • Next by Date: Re: how to evaluate an NSString content as a real obj-c instruction/expression
  • Previous by thread: Re: Cocoa class for queuing operations?
  • Next by thread: Re: Attachable and observable patterns
  • Index(es):
    • Date
    • Thread