Re: encoding/decoding selectors?
Re: encoding/decoding selectors?
- Subject: Re: encoding/decoding selectors?
- From: Andy Lee <email@hidden>
- Date: Mon, 15 Dec 2008 09:24:31 -0500
On Dec 15, 2008, at 8:47 AM, Karan, Cem (Civ, ARL/CISD) wrote:
- (void) encodeWithCoder:(NSCoder *) aCoder
{
[aCoder encodeObject:NSStringFromSelector(self.selector)
forKey:@"selector"];
}
- (id) initWithCoder:(NSCoder *)aDecoder
{
self.selector = NSSelectorFromString([aDecoder
decodeObjectForKey:@"selector"]);
}
Is this the correct method?
I would think so. The actual bits that go into a SEL are determined
at runtime, so you can't store those.
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden