[Biococoa-dev] Comments on BCAnnotation
Alexander Griekspoor
mek at mekentosj.com
Thu Feb 24 05:02:12 EST 2005
On 24-feb-05, at 7:17, Charles PARNOT wrote:
> After going through your code, Alex, here are my comments:
>
> * we should make BCAnnotation and BCFeature immutable and thus not
> have any setter; for instance, the annotations would otherwise have to
> be physically copied every time a piece of sequence is copied and
> pasted or used for alignement, etc...
Yep, I'll change that and make the setters private.
>
> * I don't like the comparison methods names; why not stick to the
> Cocoa way, which is simply 'compare:' using 'compareName:' and
> 'compareContents:'. And I am not sure why you would need a ascending
> and descending method when one can use reverseEnumerator?
Somehow this is the way I always used to implement rapid sorting for
tableviews. Say you have a mutablearray of BCAnnotations displayed in a
tableview, you can quickly sort them in ascending or descending order
with this method. Haven't used bindings enough to see if that has
become obsolete now. Yes, I can change the methods to compareName: and
compareContents: no problem.
> * In the comparison: more generally, if the Contents are of the same
> class and both respond to 'compare:', then this is what is used
What do you try to say? I don't get the point..
> * the data type should be an ivar, if you want to preserve annotations
> coming from another app; in which case the contents is NSData; more
> precisely, when unarchiving, if the class is known, the contents is
> unarchived; otherwise, the ivar 'contentsClass' stores the class name
> and the ivar 'contents' stores the unarchived data;
Again, I'm not really what you would like to see.
My proposal was to keep the datatype as it is, an NSString. And add a
dataclass getter which does what phil wants to see (return a class
instead of a string). Is this what you mean?
> otherwise, it looks very clean and a good start!
Thanks!
Alex
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: mekentosj at mac.com
E-mail: a.griekspoor at nki.nl
Web: http://www.mekentosj.com
4Peaks - For Peaks, Four Peaks.
2004 Winner of the Apple Design Awards
Best Mac OS X Student Product
http://www.mekentosj.com/4peaks
*********************************************************
More information about the Biococoa-dev
mailing list