• 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
[NSCoder versionForClassName] gives the current version?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSCoder versionForClassName] gives the current version?


  • Subject: [NSCoder versionForClassName] gives the current version?
  • From: Jonathan del Strother <email@hidden>
  • Date: Wed, 9 Nov 2005 15:37:10 +0000

I'm decoding a object using initWithCoder:, and checking the version number of the stored object using versionForClassName:
It appears to be giving me the version number of the existing class, rather than the version number of the stored class.


eg, if I do the following :

unsigned versionA = [coder versionForClassName:@"Preset"];	//returns 2.
[Preset setVersion:3];
unsigned versionB = [coder versionForClassName:@"Preset"];	//returns 3


Surely this isn't right? Isn't the point of versionForClassName: to return the version of the stored object, so you can upgrade old versions?


Jon
_______________________________________________
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


  • Follow-Ups:
    • Re: [NSCoder versionForClassName] gives the current version?
      • From: Will Mason <email@hidden>
  • Prev by Date: CFPropertyListCreateFromXMLData() error
  • Next by Date: Re: Cocoa optimization
  • Previous by thread: CFPropertyListCreateFromXMLData() error
  • Next by thread: Re: [NSCoder versionForClassName] gives the current version?
  • Index(es):
    • Date
    • Thread