[Biococoa-dev] BCSymbol Nomenclature
jtimmer at bellatlantic.net
Fri Aug 20 19:59:59 EDT 2004
>> Koen's dictionary is symbol based, and I could switch to that easily,
>> and he
>> could add a chemical name to his. I could change my
>> "initWithDictionary" to
>> an "initWithName" and look things up in the dictionary as he does.
> I suggest to rename initWithName to initWithSymbol. But we can have
> both an initWithDictionary, and initwithSymbol class. Put the same
> stuff in BCSymbol, and then the subclass can call [super
> initWithSymbol], etc and do any additional specialized stuff.
> John, in what case would you call initWithDictionary? If I create a
> sequence from a string or other BCSequence I have to iterate through
> each symbol and then call initwithSymbol passing that symbol, so I am
> not sure in what situation one needs to call initWithDictionary.
I've updated my .plist file to be symbol based. I'll update the
intialization method to be "initWithSymbol" tonight. It looks like it's all
a matter of where you put the abstraction - either looking up the dictionary
when you initialize the base, or looking up the dictionary and using it to
initialize the base.
When you create a sequence, you'd probably just go through a character at a
time and use the "+ (id) baseForSymbol: (unichar)symbol" method, which in
turn will get you the appropriate singleton reference, initializing it if
necessary. You should never have to initialize a base manually.
Feel free to delete anything from BCSequenceDNA that's held in the
superclass, as I wrote in my last message.
Koen, I'm going to go home and eat dinner now, so I won't get in your way
for a little while. I'll work exclusively on BCNucleotideDNA and its
.plist, so I should stay out of your way (I hope).
This mind intentionally left blank
More information about the Biococoa-dev