• 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
encoding structs (NSCoder / NSArchiver issue)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

encoding structs (NSCoder / NSArchiver issue)


  • Subject: encoding structs (NSCoder / NSArchiver issue)
  • From: Aaron Boothello <email@hidden>
  • Date: Mon, 19 Jan 2004 12:50:13 +0800

Im kinda foreign to the concept of NSCoder and NSArchiver/Unarchiver, so please bear with me.

Ive managed to figure out how to save ints,floats,strings to a file and load em up again.

But now, im trying to save an array of objects, each of which are made up of an array of structs.
The structs are declared as follows:
struct pointStruct //POINTSTRUCT
{
float vertices[3]; //x,y,z coordinates
float offset[3]; //x,y,z offset
float scale[3]; //x,y,z scale
float angle[3]; //x,y,z angle

BOOL selectedPoint; //selected flag
};

struct planeStruct //PLANESTRUCT
{
struct pointStruct points[MAXPOINTS+1]; //pointStruct array
int pointCounter; //number of point in current plane
float offset[3]; //x,y,z offset
float scale[3]; //x,y,z scale
float angle[3]; //x,y,z angle
};


each of my objects is made up of an array of "planeStruct"....so how do i save the object out to a file, and load it back in when i need to ?

Thanks,
Aaron.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: encoding structs (NSCoder / NSArchiver issue)
      • From: Justin Anderson <email@hidden>
  • Prev by Date: Re: How to convince company I should switch to Cocoa
  • Next by Date: Re: Codewarrior for Cocoa
  • Previous by thread: Re: How to convince company I should switch to Cocoa
  • Next by thread: Re: encoding structs (NSCoder / NSArchiver issue)
  • Index(es):
    • Date
    • Thread