size of enum when used with NSCoder decodeValueOfObjCType: ??? int?
size of enum when used with NSCoder decodeValueOfObjCType: ??? int?
- Subject: size of enum when used with NSCoder decodeValueOfObjCType: ??? int?
- From: tyler <email@hidden>
- Date: Tue, 24 Jul 2001 15:51:36 -0700
Hey All,
So anyone know what type to use with the NSCoder protocol for enums...?
In CW there was an "enums always int" preference to force int size for
enums, though that caused real problems with the MSL if you were not
careful.
Here's where I'm wondering:
typedef enum statusType {
SOME_STATUS_NO = 0,
SOME_STATUS_YES,
SOME_STATUS_MAYBE
} statusType;
- (id)initWithCoder:(NSCoder *) aDecoder
{
[ aDecoder decodeValueOfObjCType: @encode(int) at:
&status ]; // int??
}
thanks in advance!
tyler