Re: Automatically Call a Function

2008-06-15 Thread Philip Lee Bridson
Actually no I didn't. Now it works fine, in my frustration that was something I hadn't even considered that I get wrong. Thanks for the reply. Phil. On 15 Jun 2008, at 22:16, Ken Thomases wrote: On Jun 15, 2008, at 3:59 PM, Philip Lee Bridson wrote: -(void)applicationDidFinishLaunching:(

Re: Automatically Call a Function

2008-06-15 Thread Ken Thomases
On Jun 15, 2008, at 3:59 PM, Philip Lee Bridson wrote: -(void)applicationDidFinishLaunching:(NSNotification *)notification { printf("In Delegate method.\n"); //DEBUG winCtrl = [[NSWindowController alloc] initWithWindowNibName:@"Window"]; [winCtrl showWindow:self];

Re: Automatically Call a Function

2008-06-15 Thread Philip Lee Bridson
Hi There, I used the notification like suggested and I still cannot display my window. This is my code: -(void)applicationDidFinishLaunching:(NSNotification *)notification { printf("In Delegate method.\n"); //DEBUG winCtrl = [[NSWindowController alloc] initWithWindow

Re: Automatically Call a Function

2008-06-15 Thread Marcel Weiher
On Jun 15, 2008, at 10:09 , Philip Lee Bridson wrote: Firstly I need a function to automatically run from a class used in MainMenu.nib when the main.m calls NSApplicationMain(); The NSApplication object provides this facility: http://developer.apple.com/documentation/Cocoa/Reference/Applica

Re: Automatically Call a Function

2008-06-15 Thread Stephen J. Butler
On Sun, Jun 15, 2008 at 12:09 PM, Philip Lee Bridson <[EMAIL PROTECTED]> wrote: > I have tried to put the function in awakeFromNib but then the window wont > close itself from that function. I have also tried putting my first window > before the call to NSApplicationMain but then the application cr

Automatically Call a Function

2008-06-15 Thread Philip Lee Bridson
Hi there - sorry this is actually two questions in one. Firstly I need a function to automatically run from a class used in MainMenu.nib when the main.m calls NSApplicationMain(); Also, I cannot figure out why when I initialize a window from a nib or from a file before the call to NSApplic