Re: NSToolbar problem
Re: NSToolbar problem
- Subject: Re: NSToolbar problem
- From: Brent Gulanowski <email@hidden>
- Date: Tue, 11 May 2004 08:52:37 -0400
On May 11, 2004, at 4:43 AM, Fjolnir Asgeirsson wrote:
>
I'm having some trouble with NSToolbar.
>
>
I get a runtime error which says:
>
>
>
Code:
>
>
2004-05-10 12:26:24.449 MacFreeSCI[21361] *** -[AppController
>
isEqualToString:]: selector not recognized
>
2004-05-10 12:26:24.450 MacFreeSCI[21361] An uncaught exception was
>
raised
>
2004-05-10 12:26:24.497 MacFreeSCI[21361] *** -[AppController
>
isEqualToString:]: selector not recognized
>
2004-05-10 12:26:24.498 MacFreeSCI[21361] *** Uncaught exception:
>
<NSInvalidArgumentException> *** -[AppController isEqualToString:]:
>
selector not recognized
The first thing you do in this situation is find in your code where you
send the message -isEqualToString:
It appears below.
[removed unrelated code]
>
- (NSToolbarItem *)toolbar:toolbar
>
itemForItemIdentifier:itemIdentifier
>
willBeInsertedIntoToolbar:(BOOL)flag
As joar pointed out, this is deviant (missing types on two parameters).
>
{
>
(NSToolbarItem *)toolbarItem = [[[NSToolbarItem alloc]
>
initWithItemIdentifier:itemIdentifier] retain];
>
>
if ([itemIdentifier isEqualToString:addIdentifier])
So here is the first use of -isEqualToString: (the other use is the
same). The itemIdentifier is coming from somewhere else, however, so
this code is not where the particular problem originates. The calling
code is sending your AppController instead of a string. Is
itemIdentifier an outlet? If so, you may have something connected wrong
in Interface Builder.
[removed unrelated code]
--
Brent Gulanowski email@hidden
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.