[Biococoa-dev] Annotation

Charles PARNOT charles.parnot at stanford.edu
Sun Feb 20 14:05:04 EST 2005

It is because you have not #import-ed the BCSequenceProtein header, so the compiler does not know it is a subclass of BCAbstractSequence. It knows that it is a class, though, because you have the @class statement in the header of BCSequenceReade (otherwise you would get a compiler error).

It is my plan to put more info about BCSequence. BTW, it is NOT a class cluster (it would be if there was only one public class with private subclass), it is simply a placeholder class. When you use the other subclasses of BCAbtractSequence, everything just works like a normal class-subclass design, and BCSequence won't interfere. When you use BCSequence, things get more subtle at runtime, but you can ignore them for the most part... In other words, the magic is at runtime, but the compiler behavior is quite strightforward: if it has not heard of a class, you get an error; if it has not heard of a mehod, you get a warning.

BCSequenceReader should probably be able to return a BCAbstractSequence instance now, with methods like:
-(BCSequence *)sequence;
-(BCSequenceProtein *)proteinSequence;
that the user could call depending on what she wants (strong typing or weak typing).


At 11:43 AM -0500 2/20/05, Koen van der Drift wrote:
>I added some initial code for annotations to BioCocoa. BCAbstractSequence has 2 methods to set and get annotations. To test the code, I added some lines to readSwissProt in BCSequenceReader. When I compile the code, I get a warning that BCSequenceProtein might not respond to the addAnnotation (which I added to BCAbstractSequence). Also, when I step through the code, no annotations are added. Should I add the code as well to seach subclass of BCAbstractSequence to make this work? That seems rather redundant to me. I guess I still not completely understand how the class cluster code works.  Charles, maybe you can add some documentation about this in the developer docs folder?
>- Koen.

Help science go fast forward:

Charles Parnot
charles.parnot at stanford.edu

Room  B157 in Beckman Center
279, Campus Drive
Stanford University
Stanford, CA 94305 (USA)

Tel +1 650 725 7754
Fax +1 650 725 8021

More information about the Biococoa-dev mailing list