Re: import Header??
Re: import Header??
- Subject: Re: import Header??
- From: "Alan Smith" <email@hidden>
- Date: Fri, 25 Aug 2006 10:39:44 -0400
Yes, this is fixable.
The error is because the ArrayController is not declared in
MyDocument. To access it from MyDocument put something like this in
MyDownload:
- (NSArrayController*)downloadArrayController
{
return arrayController;
}
You can name the method anything you like, also change the name of the
returned variable to the name of the IBOutlet.
This won't wok alone so add this too:
static MyDownload *sharedInstance = nil;
- (void)awakeFromNib
{
if (sharedInstance == nil)
sharedInstance = self;
}
- (MyDownload*)sharedInstance
{
return sharedInstance;
}
Now, to access it from MyDocument use some code like this:
id outlet = [[MyDownload sharedInstance] arrayController];
You then can do whatever you want with the outlet.
Enjoy, Alan
On 8/25/06, Bastiaan <email@hidden> wrote:
Dear Readers,
I imported "MyDocument.h" into "MyDownload.h", i was hoping this was
enough but now it gives me an error during a compile
'logoArrayController' undeclared (first use in this function)
LogoArrayController is named in MyDocument.h as an outlet, why does
it give me the error above and how can i solve it so that i can make
use of the ArrayController in MyDownload?
Hopefully somebody outthere can help me out!
Kind regards
Bastiaan
_______________________________________________
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
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"Don't waste your life doing things others have already done."
_______________________________________________
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