[Biococoa-dev] Subclass organization
Koen van der Drift
kvddrift at earthlink.net
Thu Feb 24 21:58:49 EST 2005
On Feb 24, 2005, at 9:22 PM, John Timmer wrote:
> Yeah - asking for a translation of a protein and getting the protein
> doesn't
> seem unreasonable, and is certainly safer than getting nil.
>
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?
> I'll put in the BCSymbolNucleotide tomorrow, along with the
> BCSequenceNucleotide.
Great!
- Koen.
More information about the Biococoa-dev
mailing list