None of this code was written by me, so I don't know the reasoning behind the 
design. We have a popup that shows an NSWindow with an NSBrowser in it. There 
is a NSPopUpButtonCell subclass that handles the click with 
trackMouse:inRect:ofView:untilMouseUp:. This trackMouse method calls [NSApp 
run].

When a click happens outside the browser window, it calls [NSApp stop:nil] from 
our NSWindowDidResignKeyNotification observer for the browser window. At that 
point, it seems like the app is actually trying to terminate, because all hell 
breaks loose - release builds crash with no crash log and debug builds crash 
with a stack of:

#0-9 is in the dtor for one of our global objects.
#10     0x91a1cebf in __cxa_finalize ()
#11     0x91a1fdb9 in exit ()
#12     0x957ba692 in NSApplicationMain ()
#13     0x01310fb8 in main ()

This leads me to believe that using run and stop: is the wrong way to do this. 
What's another way to start and stop a "local" run loop?

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to