[Biococoa-dev] KDTextView update
Alexander Griekspoor
a.griekspoor at nki.nl
Fri Apr 14 07:48:21 EDT 2006
Hmm, that is my code already, why didn't the other stuff work then?
It works fine in enzymex...
Alex
On 14-apr-2006, at 13:41, Koen van der Drift wrote:
>
> On Apr 13, 2006, at 9:28 PM, Koen van der Drift wrote:
>
>> We also need a method to return a plain NSString from richtext
>> input, though. For instance, I copy-pasted the short sequence that
>> Alex gave as an example (ATTAATAGATGAF ), but that was rich text
>> from Mail.app, so it showed up as follows in the view:
>>
>> rtmacanscgccartccasbrtnttbswsscharstHvtcacrtbrdgrnbdtabardardtabnatra
>> scATTAATAGATGA
>>
>> I couldn't find a method in the FoundationKit, so I started a
>> category method in BCUtilString, but it is not working yet. This
>> method can then also be used in BCSequenceReader.
>
>
> I think I solved that, I changed readSelectionFromPasteboard in
> BCSequenceView to only accept NSStringPboardType:
>
> - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:
> (NSString *)type{
>
> // the docs say to call this first, so we do ;-)
> [pboard types];
> // try to read a string, if not succesful bummer, otherwise insert it
> NSString *aString = [pboard stringForType:
> NSStringPboardType]; // only accept plain strings
> if(aString){
> [self insertText: aString];
> return YES;
> }
> else
> return NO;
> }
>
> Would this break anything else? If not, I will commit it.
>
> cheers,
>
> - Koen.
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
***********************************
Mek (Alexander Griekspoor)
MekenTosj.com
Web: http://www.mekentosj.com
Mail: mek at mekentosj.com
***********************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20060414/0f179e8a/attachment.html>
More information about the Biococoa-dev
mailing list