Re: Encoding BOOL Objects?
Re: Encoding BOOL Objects?
- Subject: Re: Encoding BOOL Objects?
- From: "Clark S. Cox III" <email@hidden>
- Date: Tue, 19 Mar 2002 20:19:49 -0500
On 03/19/2002 14:54, "Michael Briscoe" <email@hidden> wrote:
>
Hello List,
>
>
I'm trying to encode/decode boolean properties from within my class. I
>
used:
>
[coder encodeValueOfObjCType:@encode(BOOL) at:&animating];
>
>
It appears to work (no errors at compile or runtime), but when the
>
object is decoded it returns (null).
>
>
I also tried encoding/decoding the boolean values using int, and char as
>
the encode type, but that didn't work either.
>
>
What am I doing wrong?
How are you doing the decoding? I suspect, from your description that
you are using [ decoder decodeObject ]; If that is the case, then that is
your problem; decodeObject is for decoding Obj-C objects. You probably want
to use: [ decoder decodeValueOfObjCType:@encode(BOOL) at:&value ];
_______________________________________________
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.