• 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: How to archive structs like NSRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to archive structs like NSRect


  • Subject: Re: How to archive structs like NSRect
  • From: Hank Heijink <email@hidden>
  • Date: Mon, 12 Nov 2007 09:27:33 -0500

You can wrap an NSRect in an NSValue, but I just use NSRectToString and NSStringToRect to make it an object.

Hope that helps,
Hank

On Nov 12, 2007, at 9:12 AM, Andrew Ebling wrote:

I have an object which contains an NSRect which I need to archive. What is the best way to archive this using an NSKeyedArchiver? Do I really have to go through and archive every primitive contained in it (and sub-structures)?

I'm looking at the Archives and Serializations Programming Guide for Cocoa (Developer Documentation) and it suggests I do this, rather than attempt to wrap it in an NSData object. Or should I just write my own wrapper? It's so much easier in Java where everything is an object or is easily wrapped in an object!

Any advice, suggestions, or just pointers to where to go looking for an answer, gratefully received.

best regards,

Andrew
_______________________________________________

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:
@runbox.com


This email sent to email@hidden


Hank Heijink email@hidden



_______________________________________________

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: How to archive structs like NSRect
      • From: Hank Heijink <email@hidden>
References: 
 >How to archive structs like NSRect (From: Andrew Ebling <email@hidden>)

  • Prev by Date: Re: How to archive structs like NSRect
  • Next by Date: Re: drawing an array of pixels to the screen
  • Previous by thread: Re: How to archive structs like NSRect
  • Next by thread: Re: How to archive structs like NSRect
  • Index(es):
    • Date
    • Thread