Re: Crash with toolbars
Re: Crash with toolbars
- Subject: Re: Crash with toolbars
- From: Peter Ammon <email@hidden>
- Date: Mon, 29 Sep 2008 12:50:00 -0700
On Sep 28, 2008, at 4:20 PM, Felipe Monteiro de Carvalho wrote:
Hello,
I am having a problem with toolbars. I have created a delegate class
for my toolbar, but when I added the
toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: method it
crashes:
Exception: EXC_BREAKPOINT (0x0006)
Code[0]: 0x00000002
Code[1]: 0x00000000
Thread 0 Crashed:
0 com.apple.Foundation 0x9282a45f _NSRaiseError + 227
1 com.apple.Foundation 0x92851247 +[NSException raise:format:]
+ 57
2 com.apple.Foundation 0x9285108c
_NSArrayRaiseInsertNilException + 75
3 com.apple.Foundation 0x927f47fc -[NSCFArray
insertObject:atIndex:] + 125
4 com.apple.AppKit 0x933c5279 -[NSToolbar
_forceInsertItem:atIndex:] + 364
5 com.apple.AppKit 0x933c4df2 -[NSToolbar
_insertNewItemWithItemIdentifier:atIndex:notifyDelegate:notifyView:notifyFamilyAndUpdateDefaults
:]
+ 152
It looks like your delegate method is returning nil. You can't return
nil from itemForItemIdentifier:.
I suppose that the bool used in the routine will be mapped to a long,
is that it? What is the adequate type encoding for a bool in
Objective-C? The docs says nothing about this.
BOOLs are signed char.
-Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden