runModalSession/endModalSession problem
runModalSession/endModalSession problem
- Subject: runModalSession/endModalSession problem
- From: "Ron Anderson" <email@hidden>
- Date: Mon, 29 Sep 2003 22:39:49 -0400 (EDT)
- Organization: AOL
I implemented a modal dialog using the
beginModalSessionForWindow/runModalSession/endModalSession routines. I
use a timer to call runModalSession, and everything seems to work ok
while the window is displayed. When I close the window, by calling
[NSApp stopModal], then runModalSession one more time to get the non
NSRunContinuesResponse value (either Stopped or Aborted), then
endModalSession, and finally [window close] to get rid of the window, the
application seems fine until I click in the menubar. The application
crashes (EXC_BAD_ACCESS) with the following stack:
#0 0x9068ba54 in objc_msgSend
#1 0x930aafc0 in _NSTargetForSendAction
#2 0x930b1fbc in -[NSMenu _enableItems]
#3 0x930d2534 in -[NSMenu(carbonMenu_Private) _recursiveEnableItems]
#4 0x930d2584 in -[NSMenu(carbonMenu_Private) _recursiveEnableItems]
#5 0x930ec664 in _NSHandleCarbonMenuEvent
#6 0x9308e22c in _DPSNextEvent
#7 0x930a0158 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#8 0x930b1d88 in -[NSApplication run]
#9 0x9315fc58 in NSApplicationMain
#10 0x00003e8c in main at main.m:13
Funny thing, I get the exact same behavior when I use [NSApp
beginSheet...] with a NULL parent window.
It seems that the application still thinks it is in a modal mode, cause
when I try Command-Q to quit, it does not respond...much like it would in
the modal mode.
Has anyone run into this problem?
Ron Anderson
email@hidden--
_______________________________________________
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.