[Biococoa-dev] Base test
Alexander Griekspoor
mek at mekentosj.com
Fri Aug 13 14:46:35 EDT 2004
Well, the problem really is that we get the name of the method from a
plist (the plist would contain all the complementary bases), so as a
NSString. The trick is how to convert the name into a selector that we
can call. Another complicating factor is that the performSelector:
method is a NSObject instance method, so won't work on a class. I have
found an ObjC function that gets you to the method location (it works
because in my simple test it did not return NULL). But how does the
ObjC runtime invokes a class method? My knowledge on the runtime
architecture is clearly insufficient here...
Alex
Ps. I could post this on the cocoa-dev list of course, good idea?
Op 13-aug-04 om 20:34 heeft Jim Balhoff het volgende geschreven:
> Hi John,
>
> On Aug 13, 2004, at 1:39 PM, John Timmer 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.
>>
>
> I'm not exactly sure what you mean here - are you asking how to call a
> class method? These are just defined with a "+" instead of a "-" in
> the header. So you would just send a message to the class itself (no
> need to allocate it or anything). Like:
>
> BCNucleotide *myG = [BCNucleotide gNucleotide];
>
> The BCNucleotide class method would either allocate a new G instance,
> or return one it already made.
>
> Sorry I haven't been participating much in the design discussions -
> I'm trying to write a dissertation here! I am hoping to have lots of
> time for coding in a couple of months.
>
> - Jim
>
> ____________________________________________
> James P. Balhoff
> Dept. of Biology
> Duke University
> Durham, NC 27708-0338
> USA
>
>
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: mekentosj at mac.com
E-mail: a.griekspoor at nki.nl
Web: http://www.mekentosj.com
LabAssistant - Get your life organized!
http://www.mekentosj.com/labassistant
*********************************************************
More information about the Biococoa-dev
mailing list