FROM : Stephen J. Butler
DATE : Sun Jun 15 20:29:31 2008
On Sun, Jun 15, 2008 at 12:09 PM, Philip Lee Bridson
<<email_removed>> 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 crashes due to
> a memory leak, I have tried using an autorelease pool and still it crashes
> when I try to initialize the window. I tried both loading the window from
> nib file and a programmed class but it just keeps crashing
Make your controller the delegate of NSApplication and handle
applicationDidFinishLaunching:. Alternately, you can set yourself up
as a listener for the NSApplicationDidFinishLaunchingNotification.
The reason your app crashes before NSApplicationMain is because you
need to call at least NSApplicationLoad. But the proper way to do what
you want is from applicationDidFinishLaunching anyway.
DATE : Sun Jun 15 20:29:31 2008
On Sun, Jun 15, 2008 at 12:09 PM, Philip Lee Bridson
<<email_removed>> 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 crashes due to
> a memory leak, I have tried using an autorelease pool and still it crashes
> when I try to initialize the window. I tried both loading the window from
> nib file and a programmed class but it just keeps crashing
Make your controller the delegate of NSApplication and handle
applicationDidFinishLaunching:. Alternately, you can set yourself up
as a listener for the NSApplicationDidFinishLaunchingNotification.
The reason your app crashes before NSApplicationMain is because you
need to call at least NSApplicationLoad. But the proper way to do what
you want is from applicationDidFinishLaunching anyway.
| Related mails | Author | Date |
|---|---|---|
| Philip Lee Bridson | Jun 15, 19:09 | |
| Stephen J. Butler | Jun 15, 20:29 | |
| Marcel Weiher | Jun 15, 20:31 | |
| Philip Lee Bridson | Jun 15, 22:59 | |
| Ken Thomases | Jun 15, 23:16 | |
| Philip Lee Bridson | Jun 15, 23:25 |






Cocoa mail archive

