Re: Selector not recognised error
Re: Selector not recognised error
- Subject: Re: Selector not recognised error
- From: Andy Lee <email@hidden>
- Date: Sun, 24 Mar 2002 19:53:59 -0500
At 4:35 PM -0800 3/24/02, Zac Belado wrote:
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?
The error message is telling you that you are trying to send an
-appendString: message to an AppController. So my first guess would
be that finalText has somehow been made to point to an AppController,
despite what you declared it as.
Use the debugger to break just before the -appendString: statement,
and examine the finalText variable. If it is in fact an
AppController rather than an NSMutableString, work your way back in
your code to figure out how that happened.
--Andy
_______________________________________________
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.