[Biococoa-dev] mass calculator bug
Koen van der Drift
kvddrift at earthlink.net
Sat Aug 28 12:00:33 EDT 2004
On Aug 28, 2004, at 11:13 AM, John Timmer wrote:
> And please fix my experimentation with the adenosine @"A" -> 'A'
> conversion.
Now I look closer at that code:
NSDictionary *tempDict = [baseDefinitions objectForKey: @"A"];
if ( tempDict != nil && [tempDict isKindOfClass: [NSDictionary
class]] ) {
adenosineRepresentation = [[BCNucleotideDNA alloc]
initWithSymbol: [@"A" characterAtIndex: 0]];
[baseDefinitions removeObjectForKey: @"A"];
}
Why not write this as one line:
adenosineRepresentation = [[BCNucleotideDNA alloc] initWithSymbol:'A'];
I don't understand the function of tempDict, and the removeObjectForKey
line.
- Koen.
More information about the Biococoa-dev
mailing list