Skip navigation.
 
mlRe: Checking a method for parameter types via SEL
FROM : Bill Bumgarner
DATE : Mon Jul 31 20:49:56 2006

On Jul 31, 2006, at 11:23 AM, Tommy Nordgren wrote:

> Can someone who have been using cocoa long please tell me how to do 
> this?
> The signature should be like this:
> -(BOOL) aMethod: (id) owner;


What, exactly, are you trying to do?

The Obj-C runtime supports introspection and you can grab the method 
signature and then rip it apart to deduce parameter and return 
types.  To a degree;  you lose with complex C types and certain other 
parameter types.

I would suggest poking through the source code for one of the various 
Obj-C bridges to see the full details;  PyObjC, F-Script (Smalltalk-
esque), RubyCocoa, and CamelBones (Perl-ObjC) all introspect to do 
cross language method dispatches.

b.bum

Related mailsAuthorDate
mlChecking a method for parameter types via SEL Tommy Nordgren Jul 31, 20:23
mlRe: Checking a method for parameter types via SEL Andrei Tchijov Jul 31, 20:30
mlRe: Checking a method for parameter types via SEL Ryan Britton Jul 31, 20:32
mlRe: Checking a method for parameter types via SEL Sherm Pendley Jul 31, 20:39
mlRe: Checking a method for parameter types via SEL Bill Bumgarner Jul 31, 20:49
mlRe: Checking a method for parameter types via SEL Tommy Nordgren Jul 31, 21:31
mlRe: Checking a method for parameter types via SEL Erik Buck Jul 31, 23:19
mlRe: Re: Checking a method for parameter types via SEL Michael Ash Aug 1, 01:09