• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Handling two or more nib files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling two or more nib files


  • Subject: Re: Handling two or more nib files
  • From: Raphael <email@hidden>
  • Date: Mon, 25 Jul 2005 17:23:36 +0200

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:
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


  • Follow-Ups:
    • Re: Handling two or more nib files
      • From: SA Dev <email@hidden>
References: 
 >Re: Handling two or more nib files (From: Rustam Muginov <email@hidden>)

  • Prev by Date: HTTP extensions to NSMutableURLRequest erroneously modify headers
  • Next by Date: Re: Handling two or more nib files
  • Previous by thread: Re: Handling two or more nib files
  • Next by thread: Re: Handling two or more nib files
  • Index(es):
    • Date
    • Thread