Re: Selector not recognised error
Re: Selector not recognised error
- Subject: Re: Selector not recognised error
- From: David Remahl <email@hidden>
- Date: Mon, 25 Mar 2002 01:46:30 +0100
>
I have the following code snippet
>
>
theResults = [NSString stringWithFormat:@"%d : %@\n", n, currentLine];
>
[finalText appendString:theResults];
>
>
theResults is defined as an NSstring and finalText is defined as an
>
NSMutableString
>
>
When the code runs I get an error
>
>
2002-03-24 15:38:09.815 dView[682] *** -[AppController appendString:]:
>
selector not recognized
>
>
Any idea why its raising this error when appendString is most assuredly a
>
method of NSMutableString?
Notice the "[AppController"-part? That means that some instance of
AppController is the object receiving the appendString: message. Probably
you messed up and finalText is a pointer to your controler for some reason,
or this is not the snippet causing the problem, and the real issue lies some
in other place.
finalText is "defined" as NSMutableString, you say. Note that while it may
be NSMutableString *finalText in your code, but that wouldn't stop you from
doing smtng like finalText = [NSApp delegate] for example.
Good luck on tracking it down. One good way would be breaking on
[NSException raise] in gdb. That will reveal where in your code the
offending message is sent. It will also let you examine the real contents of
finalText.
/ David
_______________________________________________
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.