[Biococoa-dev] KDTextView update
Koen van der Drift
kvddrift at earthlink.net
Fri Apr 14 18:08:47 EDT 2006
On Apr 14, 2006, at 4:53 PM, Alexander Griekspoor wrote:
> Still it is weird that rtf works fine in enzymeX, the problem thus
> must be in the different type of filtering..
Did you try stepping through the code in BioCocoa, maybe that
clarifies better what's happening here. I see that behaviour when I
drag a rtf text into the sequenceView. On my machine, the original code:
- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:
// the docs say to call this first, so we do ;-)
// try to read a string, if not succesful bummer, otherwise insert it
NSString *aString = [pboard stringForType: type];
[self insertText: aString];
aString would still contain all the rtf code in it, only when
changing the code to
NSString *aString = [pboard stringForType: NSStringPboardType];
I get a plain string for aString. Filtering happens after that
> Also in this approach you probably have to check whether [pBoard
> types] contains NSStringPboardType.
Yep, I will add that.
More information about the Biococoa-dev