Re: Handling two or more nib files
Re: Handling two or more nib files
- Subject: Re: Handling two or more nib files
- From: SA Dev <email@hidden>
- Date: Mon, 25 Jul 2005 11:29:52 -0400
Raphael:
I would suggest you go back to the Cocoa basics and gain a bit
more understanding with just using *one* nib before trying to manage
two or more. You need to concentrate more on what the File's Owner
represents, as well as creating (and effectively using) outlets.
Read the following tutorial: http://developer.apple.com/
documentation/Cocoa/Conceptual/ObjCTutorial/index.html#//apple_ref/
doc/uid/TP40000863
You should definitely be very familiar with all the concepts
touched upon here (and read even more about File's Owner) before
moving on to multiple nibs.
On Jul 25, 2005, at 11:23 AM, Raphael wrote:
Hi,
thank you, but
their is only a way to have connection from MainController to
FristWindow and not in the way FirstWindow to MainController!!
Is this right?
Cause if I set the FileĀ“s Owner to FirstWindow, they will create a
new instance of FirstWindow and not take the old instance.
And then I have no connection to the MainController.
raphael
Am 25.07.2005 um 14:00 schrieb Rustam Muginov:
You probably should check this tutorial:
http://cocoadevcentral.com/articles/000064.php
On 25.07.2005 15:55, "Raphael" <email@hidden> wrote:
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:
40ruscode.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to email@hidden
_______________________________________________
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