• 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: Managed Object with Transformable Attribute (C Struct)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managed Object with Transformable Attribute (C Struct)


  • Subject: Re: Managed Object with Transformable Attribute (C Struct)
  • From: Graham Cox <email@hidden>
  • Date: Wed, 16 Dec 2009 16:06:59 +1100

On 16/12/2009, at 3:47 PM, Richard Somers wrote:

> Thanks. Saving keyed archive of struct foo now works for xml store (I think, when I open up the xml document I was expecting to see the keys for foo but instead just see data as before).


I can't comment on the other (main) problem, but this is what I'd expect.

You're creating an archive-within-an-archive and an archive is just a block of binary data by default. If you set the output format type of your secondary archive to XML, you'll be able to see the keys, but it will still be a separate second archive within the main one.

If you don't want to archive as a secondary archive, implement -initWithCoder for your 'Foo' object (you'll need to make it into an object supporting NSCoding) and write its members individually. I'd suggest that anyway rather than using simple structs, precisely to avoid the problem you've been having.

--Graham


_______________________________________________

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

  • Follow-Ups:
    • Re: Managed Object with Transformable Attribute (C Struct)
      • From: Richard Somers <email@hidden>
References: 
 >Managed Object with Transformable Attribute (C Struct) (From: Richard Somers <email@hidden>)
 >Re: Managed Object with Transformable Attribute (C Struct) (From: Jerry Krinock <email@hidden>)
 >Re: Managed Object with Transformable Attribute (C Struct) (From: Richard Somers <email@hidden>)
 >Re: Managed Object with Transformable Attribute (C Struct) (From: Graham Cox <email@hidden>)
 >Re: Managed Object with Transformable Attribute (C Struct) (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: App works when launched from Xcode, not from Finder
  • Next by Date: Re: App works when launched from Xcode, not from Finder
  • Previous by thread: Re: Managed Object with Transformable Attribute (C Struct)
  • Next by thread: Re: Managed Object with Transformable Attribute (C Struct)
  • Index(es):
    • Date
    • Thread