• 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
Re: How should my controller objects reference eachother?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How should my controller objects reference eachother?


  • Subject: Re: How should my controller objects reference eachother?
  • From: Michael Nickerson <email@hidden>
  • Date: Tue, 24 Jul 2007 10:40:30 -0400


On Jul 23, 2007, at 8:23 PM, Carter R. Harrison wrote:


Here's an example. Let's say I have three controllers: FileController (extends NSArrayController), HTTPSubsystem (extends NSObject), GUIController (extends NSObject). All three controllers need to reference each-other. In the example below if I call "http = [[NSApp delegate] httpSubsystem];" from within FileController.m, I receive the following compiler message: "no '-httpSubsystem' method found. I hope all this makes sense, and thanks very much in advance.



You need to include the delegate's header file in FileController.m for the compiler to be able to find the -httpSubsystem method. [NSApp delegate] returns the type id, so if you don't include the delegate's header in the file you're calling this from, the compiler won't be able to find the method and will give you the warning.




--------------------------------------
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net
_______________________________________________

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


References: 
 >How should my controller objects reference eachother? (From: "Carter R. Harrison" <email@hidden>)

  • Prev by Date: Re: NSLog preventing a crash?
  • Next by Date: Re: NSLog preventing a crash?
  • Previous by thread: Re: How should my controller objects reference eachother?
  • Next by thread: How should my controller objects reference eachother?
  • Index(es):
    • Date
    • Thread