• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Selector not recognised error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selector not recognised error


  • Subject: Re: Selector not recognised error
  • From: Nicholas Riley <email@hidden>
  • Date: Sun, 24 Mar 2002 18:46:05 -0600
  • Mail-followup-to: Zac Belado <email@hidden>, Cocoa dev <email@hidden>

On Sun, Mar 24, 2002 at 04:35:14PM -0800, 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?

You almost certainly didn't retain finalText, so that memory address
is being used by another object (of class AppController, it appears).
Set NSZombieEnabled = YES while developing to catch errors like this.

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.

  • Follow-Ups:
    • Re: Selector not recognised error
      • From: Zac Belado <email@hidden>
References: 
 >Selector not recognised error (From: Zac Belado <email@hidden>)

  • Prev by Date: Re: Selector not recognised error
  • Next by Date: Malloc-related error detected with code N / NSHangOnMallocError?
  • Previous by thread: Re: Selector not recognised error
  • Next by thread: Re: Selector not recognised error
  • Index(es):
    • Date
    • Thread