On Aug 31, 2009, at 2:34 PM, David Riggle wrote:
How do I prevent this crash? It happens occasionally when I call [NSView nextValidKeyView] or [NSWindow selectKeyViewFollowingView:] in a window that has a toolbar. Here's a typical stack trace:

#6  0x948f2dcb +[NSException raise:format:arguments:]
#7 0x92e9fec4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] #8 0x968b411d +[%NSToolbarView _findFirstKeyViewInDirection:forKeyLoopGroupingView:]
#9  0x966a7590 -[NSControl needsPanelToBecomeKey]
#10 0x966a70eb -[NSView nextValidKeyView]
#11 0x96850a0f -[NSWindow selectKeyViewFollowingView:]
#12 0x106068 -[InfoController takeFocus]
#13 0x121299 -[ICSFileImporter processiTIPRequestFromOrganizer:]
#14 0x121c7b -[ICSFileImporter importFile:intoContainer:confirmContainer:]
#15 0x0c435c -[AppController openFile:viaEmail:]
#16 0x0c454b -[AppController procesEmailFile:]
#17 0x92dc188e -[NSRunLoop runMode:beforeDate:]

My keyloops are calculated automatically by NSWindow. One of my windows has an NSSearchField in the toolbar, another has preference pane style buttons. Both windows have crashed with this bug.

I sometimes move the keyboard focus programmatically as the user selects things from pop-ups, etc. In the crash above I'm moving the keyboard focus to an NSTextField in a subview of the main window in response to an email arriving.

That '%' in front of NSToolbarView's name means somebody is posing as NSToolbarView. Try turning off whatever hack is doing that.


--
Greg Parker     gpar...@apple.com     Runtime Wrangler


_______________________________________________

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 arch...@mail-archive.com

Reply via email to