• 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 the object that allocated an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

messaging the object that allocated an object


  • Subject: messaging the object that allocated an object
  • From: "James Churchman" <email@hidden>
  • Date: Wed, 14 May 2008 18:43:23 +0100

Hi guys, really beginners question but i am allocating my "webViewController
" like so:


WebViewController *webViewController = [[WebViewController alloc] init];


So now i have all my code running in my "webViewController" controller
object, but i really need to call a method that is in the "
MainViewController", which is in the the class "above",
that actually initialized the "webViewController".

(in fact i really want to message something in AppDelegate but allowing me
to message the class "above" should allow me
to extend this principle up future)


How is this posible, can i pass an id of the "parent"
(MainViewController) object
to the webViewController that will allow it to pass messages back to it?

I also tried using the "NSNotificationCenter" but that did not seem to do it



Many Thanks - sorry for the simple question, only been doing obj-c for less
than 2 weeks!




james
_______________________________________________

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: messaging the object that allocated an object
      • From: Ken Thomases <email@hidden>
    • Re: messaging the object that allocated an object
      • From: "James Churchman" <email@hidden>
  • Prev by Date: Conditionally modifying NIBs?
  • Next by Date: Re: messaging the object that allocated an object
  • Previous by thread: Re: Conditionally modifying NIBs?
  • Next by thread: Re: messaging the object that allocated an object
  • Index(es):
    • Date
    • Thread