• 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: Nick Zitzmann <email@hidden>
  • Date: Fri, 6 Mar 2009 11:42:05 -0700


On Mar 6, 2009, at 11:35 AM, Brad O'Hearne wrote:

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


You need to do this to get it to work correctly:

BOOL boolValue = ((BOOL (*)(id, SEL))objc_msgSend)(anObject, aSelector);

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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: Moving a window offscreen
  • Next by Date: Re: Dynamic getting of a property of BOOL type
  • Previous by thread: Dynamic getting of a property of BOOL type
  • Next by thread: Re: Dynamic getting of a property of BOOL type
  • Index(es):
    • Date
    • Thread