Help with Cocoa document app & controllers
Help with Cocoa document app & controllers
- Subject: Help with Cocoa document app & controllers
- From: Rick Mann <email@hidden>
- Date: Wed, 26 Dec 2007 17:10:01 -0800
I'm trying to make a cocoa document app. I have an NSDocument subclass
"ChartDocument", and an NSWindowController subclass "ChartController".
I have a nib file "ChartDocument.nib". It has a File's Owner,
Application, First Responder and Window.
The ChartController has an IBOutlet (IBOutlet ChartView* mChart) that
points to a ChartView in the window. The ChartDocument provides:
- (void)
makeWindowControllers
{
ChartController* chartController = [[ChartController alloc] init];
[self addWindowController: chartController];
/* code to do some stuff that eventually needs the ChartView */
}
In the code represented by the comment above, the ChartController is
called. It, in turn, tries to use the mChart IBOutlet that I wired up
in IB. But it's null.
Can anyone tell me why the mChart ivar isn't getting properly set? I'm
sure I'm overlooking some basic thing.
TIA,
Rick
_______________________________________________
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