Re: encodeArrayOfObjCType: (with key?)
Re: encodeArrayOfObjCType: (with key?)
- Subject: Re: encodeArrayOfObjCType: (with key?)
- From: James Spencer <email@hidden>
- Date: Mon, 21 Feb 2005 13:19:55 -0600
On Feb 21, 2005, at 12:43 PM, Chris Outwin wrote:
I would like to encode an array of 4 floats with an associated key. The code I have so far is:
- (void)encodeWithCoder:(NSCoder *)encoder {
if(encoder allowsKeyedCoding) {
[encoder encodeBool:myBOOL forKey:@"theBool"];
// I want to encode the float array with a key here.
}
else {
// encode in sequenced order here
}
}
I have several float arrays to encode. What is the approach to encode a float array having a key?
-encodeBytes:length:forKey:
This is discussed in the documentation under Archives and Serializations:Arrays of Simple Types
Spence
James P. Spencer
Rochester, MN
email@hidden
"Badges?? We don't need no stinkin badges!"
_______________________________________________
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