Re: NSMutableArray is immutable when unarchived
Re: NSMutableArray is immutable when unarchived
- Subject: Re: NSMutableArray is immutable when unarchived
- From: SA Dev <email@hidden>
- Date: Fri, 15 Jul 2005 08:47:59 -0400
Allow me to post a retraction ... this seems like it may not be
correct according to the docs: "+array Creates and returns an empty
array. This method is used by mutable subclasses of NSArray."
I'd personally still use _triggers = [[NSMutableArray alloc]
init]; which will work, but I might be wrong here in your situation.
Anybody??
On Jul 15, 2005, at 8:41 AM, SA Dev wrote:
Nick:
You're replacing your _triggers NSMutableArray with an NSArray on
init. :-)
[NSMutableArray array] returns an NSArray - immutable.
Try:
_triggers = [[NSMutableArray alloc] init];
On Jul 15, 2005, at 6:02 AM, nick briggs wrote:
- (id)initWithObject:(id)anObject
{
if(self = [super init])
{
...
_triggers = [[NSMutableArray array]retain];
...
}
return self;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden