<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hmm, that is my code already, why didn't the other stuff work then? It works fine in enzymex...<DIV><DIV>Alex</DIV><DIV><BR><DIV><DIV>On 14-apr-2006, at 13:41, Koen van der Drift wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Apr 13, 2006, at 9:28 PM, Koen van der Drift wrote:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rtmacanscgccartccasbrtnttbswsscharstHvtcacrtbrdgrnbdtabardardtabnatrascATTAATAGATGA</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I think I solved that, I changed readSelectionFromPasteboard in BCSequenceView to only accept NSStringPboardType:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString *)type{</DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><BR class="khtml-block-placeholder"></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>// the docs say to call this first, so we do ;-)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>[pboard types];</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>// try to read a string, if not succesful bummer, otherwise insert it</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>NSString *aString = [pboard stringForType: NSStringPboardType];<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>// only accept plain strings</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>if(aString){</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>[self insertText: aString];</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>return YES;</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>}</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>else</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>return NO;<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">}</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Would this break anything else? If not, I will commit it.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cheers,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">- Koen.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Biococoa-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Biococoa-dev@bioinformatics.org">Biococoa-dev@bioinformatics.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://bioinformatics.org/mailman/listinfo/biococoa-dev">https://bioinformatics.org/mailman/listinfo/biococoa-dev</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">***********************************</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mek (Alexander Griekspoor)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <SPAN class="Apple-converted-space"> </SPAN><FONT class="Apple-style-span" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;"><B style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; ">Mek</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" color="#7F7F7F" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;; color: rgb(127, 127, 127); "><B style="color: rgb(127, 127, 127); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 18px; font-weight: bold; ">en</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;"><B style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; ">Tosj</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" color="#7E7E7E" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;; color: rgb(126, 126, 126); "><B style="color: rgb(126, 126, 126); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(126, 126, 126); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(126, 126, 126); font-size: 18px; font-weight: bold; ">.</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;"><B style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; ">com</SPAN></SPAN></B></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Web: <A href="http://www.mekentosj.com">http://www.mekentosj.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mail: <A href="mailto:mek@mekentosj.com">mek@mekentosj.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">***********************************</DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></DIV></DIV></BODY></HTML>