[Biococoa-dev] Subclass organization

John Timmer jtimmer at bellatlantic.net
Thu Feb 24 22:15:28 EST 2005


Well, I don't really see the point in having complement there when I'm going
to create BCSymbolNucleotide, so I'll just do an experiment when I get into
work tomorrow (where I've got the initial files):  can I move the complement
method to BCSymbolNucleotide and not have anything break, build wise?



> I looked at changing that in BCSymbol. I think the most logical place
> would be in initializeSymbolRelationships, for instance:
> 
> symbolReference = [[self symbolInfo] objectForKey: @"Complement"];
> 
> if ( symbolReference != nil || [symbolReference length] > 0 )
> {
> complement = [(BCSymbol*)[self class] performSelector:
> NSSelectorFromString( symbolReference )];
> 
> // add this:
> 
> if (complement == nil)
> complement = self;
> }
> 
> Or I can put it in the complement method
> 
> - (BCSymbol  *)complement
> {
> if ( complement == nil )
> [self initializeSymbolRelationships];
> 
> // add this:
> 
> if (complement == nil)
> complement = self;
> 
> return (BCSymbol  *)complement;
> }
> 
> 
> What do others think?
> 
_______________________________________________
This mind intentionally left blank





More information about the Biococoa-dev mailing list