• 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: copyWithZone error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copyWithZone error


  • Subject: Re: copyWithZone error
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Fri, 26 Sep 2003 23:06:26 +0100

On Friday, September 26, 2003, at 10:39 pm, Lorenzo wrote:

Hi,
in some computer when someone launches my Cocoa app, he gets

------------------
2003-09-25 17:18:06.166 myApp[611] *** -[SUBTextField copyWithZone:]:
selector not recognized
2003-09-25 17:18:06.171 myApp[611] An uncaught exception was raised
2003-09-25 17:18:06.172 myApp[611] *** -[SUBTextField copyWithZone:]:
selector not recognized
2003-09-25 17:18:06.172 myApp[611] *** Uncaught exception:
<NSInvalidArgumentException> *** -[SUBTextField copyWithZone:]: selector not
recognized
------------------

and the application quits immediately. It won't launch.
SUBTextField is a subclass of NSTextField. And I didn't override the
copyWithZone method. Should I override it?

According to the documentation, NSTextField doesn't conform to NSCopying (i.e. it doesn't support -copyWithZone:). Your application is trying to copy it for some reason (possibly with -copy, rather than -copyWithZone:), which won't work; I would start by checking your code to make sure that you never accidentally attempt to copy an NSTextField, even inadvertently.

Kind regards,

Alastair.
_______________________________________________
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: copyWithZone error
      • From: Lorenzo <email@hidden>
References: 
 >copyWithZone error (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: GCC3.3 and mid-function class declarations
  • Next by Date: The Toolbar Widget
  • Previous by thread: copyWithZone error
  • Next by thread: Re: copyWithZone error
  • Index(es):
    • Date
    • Thread