Re: NSDrawer, NSOutlineView problem
Re: NSDrawer, NSOutlineView problem
- Subject: Re: NSDrawer, NSOutlineView problem
- From: Dix Lorenz <email@hidden>
- Date: Sat, 24 May 2003 15:52:19 +0200
Replying to myself here...
I have a window with a drawer. The drawer only contains an
NSOutlineView which controls the contents of the window, sort of like
the Mailbox-Drawer in Mail.app. Everything works exactly like I
want... until I close the window. Sometimes it crashes and I have no
idea why it should. I'm reasonably certain I haven't over- or
underreleased any objects. Excerpts from the call stack:
#0 0x9001b52c in kill
#1 0x9005ceec in abort
#2 0x90688da4 in _objc_error
#3 0x90688d30 in __objc_error
#4 0x930a0534 in -[NSTableView drawRow:clipRect:]
#5 0x93140a68 in -[NSOutlineView drawRow:clipRect:]
#6 0x930cede8 in -[NSTableView drawRect:]
#7 0x930809ec in -[NSView _drawRect:clip:]
#8 0x930763b0 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibl
eRectForView:topView:]
[more _recursiveDisplayRectIfNeededIgnoringOpacity ...]
#14 0x930963f4 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#15 0x930a5778 in -[NSView displayIfNeeded]
#16 0x930b5608 in -[NSWindow displayIfNeeded]
#17 0x930a03b0 in _handleWindowNeedsDisplay
#18 0x90148464 in CFRunLoopRunInMode
#19 0x901487d4 in CFRunLoopRunInMode
#20 0x90180f58 in CFRunLoopRunSpecific
#21 0x969a3b70 in GetEventClass
#22 0x969b3a78 in GetKeyboardFocus
#23 0x969dabbc in BlockUntilNextEventMatchingListInMode
#24 0x9308dedc in _DPSNextEvent
#25 0x930a0158 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#26 0x930b1d88 in -[NSApplication run]
#27 0x9315fc58 in NSApplicationMain
The only Outlineview I am using is the one in the drawer, so that's
where I should look for the bug. In the stack there is a call
"GetKeyboardFocus" which got me thinking maybe the outlineview still
is registered as being first responder? I tried closing the window
after first clicking anywhere in the window, so the outlineview isn't
first responder anymore: No crashes. Not conclusive, since it doesn't
always crash, but maybe a hint?
I tried in the WindowControllers windowWillClose-Notification to close
the drawer first or make it release it's firstResponder-Status by
calling [[self window] makeFirstResponder:nil]... No change, still
crashes.
I checked Mail.app a little closer, and noticed the Mailbox-Drawer
never becomes FirstResponder. So I subclassed my NSOutlineView, had
acceptsFirstResponder return NO and presto: no more crashes. Unless
somebody tells me that the outlineview shouldn't be FirstResponder I'll
consider it a bug and file that...
Dix
_______________________________________________
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.