encoding structs (NSCoder / NSArchiver issue)
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.