swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: objective-c question: get selector by ascii name


From: Ken Cline
Subject: Re: objective-c question: get selector by ascii name
Date: Wed, 30 Apr 1997 03:48:12 -0400 (EDT)

On Tue, 29 Apr 1997, Ginger Booth wrote:

> Rick,
> 
> > ps Just for my edification: how did you find that?
> 
>     /usr/local/include/gcc/objc/objc-api.h
>     
> Terse, even downright unintelligible.  But there.
>    
> Ciao, 
>     Ginger
> 

I went thru the same thing: I started looking for
sel_getUid and couldn't find it. So then I took a wag that
is might be called sel_get_uid instead... (it wasn't my
first guess, though)


In fact, I've had an email hanging around in my postpone
list for quite a while which contained a suggestion for
adding a wrapper around the sel_get_uid method.

I thought it might useful to put following in DefObject   
(or perhaps there's a more appropriate place for it):

-(BOOL) respondsToMethodNamed: (char *) name {
   return [ self respondsTo: sel_get_uid( name ) ];
}
 
-performMethodNamed: (char *) name with: (id) anObject1 {
   return [ self perform: sel_get_uid( name )
                    with: anObject1            ];
}
 
I only have a limited need for these and perhaps there are
simpler ways to do this.


Ken.
 

_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427





                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]