• 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: encoding/decoding selectors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >encoding/decoding selectors? (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)

  • Prev by Date: Re: encoding/decoding selectors?
  • Next by Date: Re: Write to file.
  • Previous by thread: Re: encoding/decoding selectors?
  • Next by thread: Docs on Open GL ES
  • Index(es):
    • Date
    • Thread