• 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: Dynamic getting of a property of BOOL type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic getting of a property of BOOL type


  • Subject: Re: Dynamic getting of a property of BOOL type
  • From: "Paul Sanders" <email@hidden>
  • Date: Fri, 6 Mar 2009 18:50:47 -0000

> id value = objc_msgSend(object, propSelector);
> BOOL booleanValue = (BOOL)value;

> How can I properly convert this id returned from the dynamic
> invocation of the property getter to the BOOL value that it actually is?

Try BOOL booleanValue = (BOOL) (long) value;

I believe this should also work on 64 bit.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Dynamic getting of a property of BOOL type (From: Brad O'Hearne <email@hidden>)

  • Prev by Date: Re: Dynamic getting of a property of BOOL type
  • Next by Date: Re: Dynamic getting of a property of BOOL type
  • Previous by thread: Re: Dynamic getting of a property of BOOL type
  • Next by thread: Re: Dynamic getting of a property of BOOL type
  • Index(es):
    • Date
    • Thread