Re: How should my controller objects reference eachother?
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