• 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
messaging between (un)related objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

messaging between (un)related objects


  • Subject: messaging between (un)related objects
  • From: Sandeep Parikh <email@hidden>
  • Date: Tue, 8 Mar 2005 18:07:30 -0600

here's the scenario, I've got 2 classes, A and B. class A contains an NSMutableArray of NSMutableDictionary objects.

class A creates an instance of class B (neither class maintains any reference to each other). class B manipulates an NSMutableDictionary. class B then needs to send its dictionary to class A. what is the best way to accomplish this?

here are my thoughts:
- class B could send the object through the use of a notification
- class A could be set as a delegate of class B and therefore be notified when the object needed to be sent
- class B could maintain a reference to A and just pass the object through one of A's methods


I don't want to re-invent the wheel here and I've been racking my brain trying to find a standard way to do this within the normal Cocoa paradigms. I feel like this is so simple and I'm just overthinking it.

Any help here would be greatly appreciated.

Thanks!
-Sandeep

_______________________________________________
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: messaging between (un)related objects
      • From: Justin Spahr-Summers <email@hidden>
  • Prev by Date: Re: Adding in a timer to a cocoa app
  • Next by Date: Re: Adding in a timer to a cocoa app
  • Previous by thread: Re: Mouse tracking rects
  • Next by thread: Re: messaging between (un)related objects
  • Index(es):
    • Date
    • Thread