Handling two or more nib files
Handling two or more nib files
- Subject: Handling two or more nib files
- From: Raphael <email@hidden>
- Date: Mon, 25 Jul 2005 13:55:12 +0200
Hi,
i start to learn cocoa, an would like to write old applications that
i have wrote in java (swing based) into cocoa.
My problem is that I need a class wich will control the program.
In my class MainController i have the following funktion:
- (void)applicationWillFinishLaunching:(NSNotification *)notification {
firstWindow_controller = [FirstWindow initWithMainController:self];
[ firstWindow_controller loadNib];
}
Ithat will work fine for me.
Now I have a connection between the MainController and the FirstWindow.
The following funktions are in the FirstWindow class
- (id)initWithController:(Main_Controller *)controller {
self = [super init];
if (self) {
ref_main_controller = controller;
}
return self;
}
+ (id)initWithMainController:(Main_Controller *)new_main_controller{
FirstWindow * firstWindow_controller = [[self alloc]
initWithController:new_main_controller];
return firstWindow_controller;
}
with ref_main_controller i have now a reference to the
MainController, i hope this is correct?
But how can I know use funktions from the MainController out of
FirstWindow?
For example I press a button on the FirstWindow wich will use a
funktion that I have in the MainController.
Could someone help me, or is this a total wrong way?
regards,
raphael
_______________________________________________
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