• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Encoding BOOL Objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Encoding BOOL Objects? (From: Michael Briscoe <email@hidden>)

  • Prev by Date: Re: Coordinate system question
  • Next by Date: Re: Threading!
  • Previous by thread: Re: Encoding BOOL Objects?
  • Next by thread: over-riding the behaviour of the tab key in a NSTextView
  • Index(es):
    • Date
    • Thread