[Biococoa-dev] Base test

Jim Balhoff james.balhoff at duke.edu
Fri Aug 13 15:03:48 EDT 2004

On Aug 13, 2004, at 2:38 PM, Alexander Griekspoor wrote:

>> I was aware of the foundation functions that take strings for 
>> arguments and return selectors/classes.  Unfortunately, if we’re 
>> going to use singletons, we’d need to call Class methods to create 
>> them, not instance methods, and I’m not aware of any mechanism for 
>> calling a selector on a Class.
> Oops, see the problem now. I can come quite far by getting the class 
> method's location:
> 	NSString *str = @"callMe"; // example string, normally from plist
> 	class_getClassMethod([BCSymbol class], selector);    // this should 
> get you a pointer to the method
> The big problem here and where I get stuck is how to "invoke" this 
> method on the class?
> Here is where my knowledge and background let me down ;-(

Could you use this function?

id objc_msgSend(id theReceiver, SEL theSelector, ...)


A classes are objects, it seems like it would work.

James P. Balhoff
Dept. of Biology
Duke University
Durham, NC 27708-0338

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2373 bytes
Desc: not available
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20040813/b11ff6a1/attachment.bin>

More information about the Biococoa-dev mailing list