[Biococoa-dev] KDTextView update

Alexander Griekspoor a.griekspoor at nki.nl
Thu Apr 13 06:47:51 EDT 2006

The big problem with textShouldChange (and thus the current  
implementation) is that it only allows YES or NO insert this string,  
you can't modify the string. No problem a single character, but if  
someone drags or paste let's say ATTAATAGATGAF then you would  
disallow that because it contains the F. What you want however is to  
allow it, but filter the F.
A solution in the context of what you had in mind would be to  
delegate the filtering to the controller in those methods that I  
override, which is easy to do and elegant.

On 13-apr-2006, at 12:41, Koen van der Drift wrote:

> On Apr 13, 2006, at 6:21 AM, Alexander Griekspoor wrote:
>> One exercise for the reader would be to add an  
>> "allowed_characterset" property, I've currently hardcoded the DNA  
>> characters, hence it doesn't work for filtering aa's.
>> I'm not sure how this fits with the bc classes, but I'll leave it  
>> up to koen to decide  if/how to implement all this.
> Well, eventually the BCSymbolSet needs to be used as a filter,  
> probably through the controller (maybe using textShouldChange or  
> something like that).
> I'll have a look at your code later today, now I'm off to work  
> soon. Thanks for improving this class.
> - Koen.
> _______________________________________________
> Biococoa-dev mailing list
> 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
                    E-mail: a.griekspoor at nki.nl
                Web: http://www.mekentosj.com

     Claiming that the Macintosh is inferior to Windows
     because most people use Windows, is like saying
     that all other restaurants serve food that is
     inferior to McDonalds


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20060413/2fefd791/attachment.html>

More information about the Biococoa-dev mailing list