Re: Read only NSMutableArray after unarchiving
Re: Read only NSMutableArray after unarchiving
- Subject: Re: Read only NSMutableArray after unarchiving
- From: Hasan Diwan <email@hidden>
- Date: Thu, 12 Dec 2002 14:26:46 -0500
David:
NSMutableArray *data = [[NSUnarchiver unarchiveObjectWit
Data:data]
mutableCopy];
That should solve your problem.
On Thursday, December 12, 2002, at 07:26 AM, David Lee wrote:
>
>
I have been having some trouble with encoding and decoding using
>
NSArchiver/NSUnarchiver under Mac OS X 10.1.5.
>
Basically I have been encoding NSMutableArray objects (which
>
themselves are filled with objects that follow the NSCoding protocol).
>
My application decodes all the data correctly however I get this
>
message when running from within project builder whenever I try to
>
edit one of the arrays that has been deserialized from disk. It seems
>
it is now a read only array. What do I have to do to stop this
>
behaviour?
>
>
RRV Studio[691] *** -[NSCFArray removeObjectAtIndex:]: mutating method
>
sent to immutable object
Hasan Diwan
OpenPGP KeyID: 0xBE42DCA6
Fingerprint: 1CB0 47E3 0A24 DAC1 DCCA 4225 F166 40C2 BE42 DCA6
http://www.cs.rpi.edu/~diwanh/gpg.key
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
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.