Dynamic getting of a property of BOOL type
Dynamic getting of a property of BOOL type
- Subject: Dynamic getting of a property of BOOL type
- From: Brad O'Hearne <email@hidden>
- Date: Fri, 6 Mar 2009 11:35:26 -0700
I am dynamically retrieving properties from an NSObject, in order to
convert the types to string values and store them in XML. I am using
the following line of code to send a message to the object to
retrieve the property's value:
id value = objc_msgSend(object, propSelector);
BOOL booleanValue = (BOOL)value;
The problem I am having is that I'm getting a warning on the second
line. I've tried a number of variations, including:
BOOL booleanValue = value;
both of which give the following warning:
warning: cast from pointer to integer of different size
How can I properly convert this id returned from the dynamic
invocation of the property getter to the BOOL value that it actually is?
Thanks,
Brad
_______________________________________________
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