Re: Behavior of autoreleased window controller for closing window vs. app termination
Re: Behavior of autoreleased window controller for closing window vs. app termination
- Subject: Re: Behavior of autoreleased window controller for closing window vs. app termination
- From: Alan Nilsson <email@hidden>
- Date: Mon, 30 Sep 2002 21:09:58 -0700
on 9/30/02 7:50 PM, James DiPalma at email@hidden wrote:
>
Can you get a backtrace for both of your windowWillClose: hits?
Yeah, funny thing though they exactly the same:
#0 -[UserController windowWillClose:] (self=0x46a3a0, _cmd=0x906de3c0,
aNotification=0x471dd0) at UserController.m:68/Users/alan/STE User Tool/
#1 0x907eaf7c in _nsNotificationCenterCallBack ()
#2 0x90168b14 in CFStorageDeleteValues ()
#3 0x90166234 in _CFNotificationCenterPostLocalNotification ()
#4 0x93370160 in -[NSWindow _close] ()
#5 0x93370274 in -[NSWindow close] ()
#6 0x907e2e14 in -[NSArray makeObjectsPerformSelector:withObject:] ()
#7 0x930c8170 in -[NSApplication _deallocHardCore:] ()
#8 0x930ccb44 in -[NSApplication terminate:] ()
#9 0x930cfe2c in -[NSApplication sendAction:to:from:] ()
#10 0x9320fd18 in -[NSMenu performActionForItemAtIndex:] ()
#11 0x9310a164 in -[NSCarbonMenuImpl
performActionWithHighlightingForItemAtIndex:] ()
#12 0x9320f0c8 in -[NSMenu performKeyEquivalent:] ()
#13 0x930cdd7c in -[NSApplication sendEvent:] ()
#14 0x930ca524 in -[NSApplication run] ()
#15 0x930d2598 in NSApplicationMain ()
#16 0x00002f08 in main (argc=1, argv=0xbffffc78) at main.m:6/Users/alan/STE
User Tool/
#17 0x00002c8c in _start (argc=1, argv=0xbffffc78, envp=0xbffffc80) at
/SourceCache/Csu/Csu-45/crt.c:267/SourceCache/Csu/Csu-45/
#18 0x00002b0c in start ()
So, in the windowWillClose method I added a line to remove the window from
the notification center and it cleared up the problem. But this can't be
correct? I have to be doing something wrong. I replaced the window I was
opening with another dummy window that does nothing, and I had no problems,
even before I added the nofication removal. Any idea's?
>
A suggestion (that will not change anything about how your code works)
>
is to change this method:
Just out of curiosity, why?
Alan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.