Re: call BOOL valued method from performSelector
Re: call BOOL valued method from performSelector
Subject : Re: call BOOL valued method from performSelector
From: Sherm Pendley <email@hidden >
Date: Thu, 24 Feb 2005 17:23:11 -0500
Delivered-to: email@hidden
Delivered-to: email@hidden
On Feb 24, 2005, at 5:09 PM, YL wrote:
what the return value of
[myObj performSelector:@selector(aBoolValuedMethod)]
and how to convert it back to BOOL
When I do
BOOL yn = (BOOL)[myObj performSelector:@selector(aBoolValuedMethod)];
The compilor says "cast from pointer to integer of different size"
From objc.h:
objc.h:typedef signed char BOOL;
BOOL is a signed char, so you can't simply typecast a pointer; the char
is 8 bits, and the pointer 32 (for now).
From the docs for -performSelector:
"For methods that return anything other than an object, use
NSInvocation."
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.