Re: IB bug? - copyWithZone: selector not recognized
Re: IB bug? - copyWithZone: selector not recognized
- Subject: Re: IB bug? - copyWithZone: selector not recognized
- From: Chris Kane <email@hidden>
- Date: Wed, 28 Aug 2002 09:29:59 -0700
On Wednesday, August 28, 2002, at 01:27 AM, Bill Cheeseman wrote:
on 02-08-27 10:19 PM, Chris Kane at email@hidden wrote:
One has to be careful when converting occurrences of old
-decodeValueOfObjCType:at:, -decodeValuesOfObjCTypes:, and
-decodeArrayOfObjCType:count:at: methods to -decodeObjectForKey:, if
you've done keyed coding conversion (I missed the first part of this
thread), as the latter gives you an autoreleased object which needs
retaining, unlike the formers. If you've done conversion, you may want
to check over your changes. An "unretained" object would explain
errors like this.
Now, that shows just amazing insight! -- or maybe you guys have been
bitten
by this many times, yourselves? I have in fact made these conversions,
and
by golly I forgot to add retain calls. Thanks for the explanation.
I guess I'd better make a slight revision to my Stepwise article about
keyed
archiving....
Messages mysteriously going to objects which don't like them is usually
freed object now reused as something else. 97% of the time at least.
This caution is actually buried in the 10+ pages of keyed archiving
conversion notes in the Foundation release notes on 10.2. Perhaps a
reward for the diligent reader....
Chris Kane
Cocoa Frameworks, Apple
_______________________________________________
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.