Specifying primitive types in NSCoders
Specifying primitive types in NSCoders
- Subject: Specifying primitive types in NSCoders
- From: Ken Tozier <email@hidden>
- Date: Sat, 29 Jun 2002 11:50:12 -0400
I'm sure this is a simple one, but I can't find any concrete examples of
how to specify primitive types in encoding and decoding methods.
For example:
- (void)decodeValueOfObjCType:(const char *)valueType at:(void *)data
What exactly do you pass into "valueType"?
Is Apple actually making us do something like this?
char floatConstant = 'f'
float floatValue;
[self decodeValueOfObjCType:&floatConstant at:&floatValue];
Don't they have constants defined for these?
I looked at NSCoder which tells you to look at chapter 4 in the Obj c
reference. Looking in Obj c reference it has a table of values, but no
examples of use and says look at NSCoder
Could someone provide a couple of quick examples for how to call encode
and decode for primitives
Thanks
Ken Tozier
_______________________________________________
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.