[Biococoa-dev] Caching the NSArray of BCSymbol
Spam Eater at BiO
spam at bioinformatics.org
Fri Jul 8 22:53:32 EDT 2005
Caught in filters.
---------------------
Hmm, although certainly nice to have a link between a view and
ultimately the sequence, this is the task of a controller class, not the
model... The model shouldn't know/care of the view. It might be nice, if
we add controllers to the framework that do this though..
Alex
On 6-jul-2005, at 23:56, Koen van der Drift wrote:
>
> On Jul 6, 2005, at 1:44 PM, Charles Parnot wrote:
>
>
>> Then, we should only cache it in one place: the accessor. Though for
>> mutable sequences, we also need to remember to set the cached array
>> to nil after modifications. Something like this:
>>
>> - (NSArray *)symbolArray
>> {
>> if ( cachedArray == nil ) {
>> cachedArray = ... //generate the array (and retain it)
>> }
>> return cachedArray;
>> }
>>
>> - (void)emptyCache
>> {
>> [cachedArray release];
>> cachedArray = nil;
>> }
>>
>> - (void)appendSequence:(BCSequence *)otherSequence
>> {
>> //code to append the sequence
>> ...
>> //empty the cache: the array is not valid anymore!!
>> [self emptyCache];
>> }
>>
>>
>> what do you think?
>>
>>
>
>
> Looks like a good start to me :) Maybe we can write the code in such
> a way that the BCSequence can be a delegate of another object (eg a view).
>
>
> - Koen.
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org <mailto:Biococoa-dev at bioinformatics.org>
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
>
*********************************************************
** 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 <mailto:mekentosj at mac.com>
E-mail: a.griekspoor at nki.nl <mailto: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
*********************************************************
*********************************************************
** 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
E-mail: a.griekspoor at nki.nl <mailto:a.griekspoor at nki.nl>
AIM: mekentosj at mac.com <mailto:mekentosj at mac.com>
Web: http://www.mekentosj.com
EnzymeX - To cut or not to cut
http://www.mekentosj.com/enzymex
*********************************************************
More information about the Biococoa-dev
mailing list