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 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.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to