• 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: IB bug? - copyWithZone: selector not recognized
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB bug? - copyWithZone: selector not recognized


  • Subject: Re: IB bug? - copyWithZone: selector not recognized
  • From: James DiPalma <email@hidden>
  • Date: Tue, 27 Aug 2002 14:45:25 -0700

First, please note that archiving errors are typically bugs in archiving code. InterfaceBuilder is not responsible for unarchiving windows at run time when your application opens a new document, nor is InterfaceBuilder responsible for archiving that window when you save your document's nib file from IB.

Some specific problems with archiving can be IB bugs, but my experience suggests that 95% of these bugs are not IB bugs. I may be a little over sensitive about this issue, but its really just a suggestion and a hint about what is happening.


On Tuesday, August 27, 2002, at 10:47 AM, Bill Cheeseman wrote:

I posted this question on the Project Builders list over the weekend but got
no reply. Any ideas?

ProjectBuilder isn't responsible for unarchiving windows either?

Every third or fourth time (somewhat random) I open a new document window in
my application, I get this error message: "-[MyTextField copyWithZone:]:
selector not recognized". Or sometimes "-[MyForm copyWithZone:]: selector
not recognized".

If you are getting non-repeatable errors like this one, it might be a reference to a released object; have you tried using zombies to prevent addresses being reused and to raise an exception where you can see what object is being sent copyWithZone:. Look at NSDebug.h or check google for zombies and cocoa (I don't think there is a chocolate zombie movie, but I could be wrong).

My Interface Builder preferences are set to "Nib File Compatibility - Both
Formats." When I resave the nib file using a different preference -- either
"Pre-10.2 format" or "10.2 and later format" -- and rebuild, the problem
goes away. (To be precise, it apparently goes away. It doesn't show up after
opening 20 or 30 new windows. And to make it go away in "10.2 and later
format" I first have to save the nib in "Pre-10.2 format".) When I return to
the both-formats setting, the problem returns.

Odd. I don't have a 10.2 install, but I would look at what actually gets written into your .nib bundle. pre-10.2 files and 10.2 files are probably both there, maybe you can see what is different. If none of a both-format nib bundles actual files differ from either single-format nib bundle, then you have an interesting problem.

The stack frame list suggests this is happening while my window is being
unarchived from the nib file. That makes sense, since I understand from the
IB Release Notes that the difference between 10.2 and pre-10.2 IB nib file
formats is the use of keyed archiving in the former.

Is your logic that given an exception in window unarchiving, you know that this nib file was saved with 10.2 developer tools? You already know how this nib file was saved and you also know that it works fine if saved 10.2 only.

If you have a stack trace, including that in your original post might have helped someone figure out what went wrong.

Could this be a result of a bug in the IB both-formats setting?

By your evidence, yes. Something wrong is happening between writing a dual format nib and reading it, but it almost certainly isn't a bug with this setting in IB (unless you have evidence that this setting doesn't actually try to write out a both-format nib file -- unlikely since it does break your nib, so something is different when this setting is set).



-jim
_______________________________________________
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: IB bug? - copyWithZone: selector not recognized
      • From: Bill Cheeseman <email@hidden>
References: 
 >IB bug? - copyWithZone: selector not recognized (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Executable into bundle?
  • Next by Date: Re: AddressBook - ABMultiValue
  • Previous by thread: IB bug? - copyWithZone: selector not recognized
  • Next by thread: Re: IB bug? - copyWithZone: selector not recognized
  • Index(es):
    • Date
    • Thread