• 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
Sending message to parent object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending message to parent object


  • Subject: Sending message to parent object
  • From: Ashley Perrien <email@hidden>
  • Date: Fri, 26 Dec 2008 10:11:20 -0600

I'm still relatively new to Cocoa (and programming in general) and very new to iPhone but this is more of a general question I've been struggling with.

What is the best / most accepted way to get a message out of an object?

Scenario 1:
I have a document application with an NSView that is basically a graph of a subset of the data in the document. I'd like to bo able to drag within the graph and have it change what data it's showing. How would I send a message from the view to the document either telling it to update the selection or to request new data? Delegate? Notification? Singleton? Other?


Scenario 2:
iPhone app (extremely simple, one view) again with data and a graph of that data. when interacting with the UIView, how do I tell the parent view that something needs changing?


Basically, what's the most acceptable way for an ivar object to communicate with it's parent?


Ashley Perrien Random Quote of the day: "If you understand what you're doing, you're not learning anything." -Abraham Lincoln

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Sending message to parent object
      • From: Robert Marini <email@hidden>
  • Prev by Date: NSSpeechRecognizer and Speech Recognition calibration
  • Next by Date: Re: NSSpeechRecognizer and Speech Recognition calibration
  • Previous by thread: Re: NSSpeechRecognizer and Speech Recognition calibration
  • Next by thread: Re: Sending message to parent object
  • Index(es):
    • Date
    • Thread