You might just go with some built-in NSTextView methods: - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard
which should take the richest data type available or if you want to specify the type: - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString *)type On Sat, Oct 3, 2009 at 1:13 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Oct 3, 2009, at 12:59 PM, Knut Lorenzen <k...@macdisk.de> wrote: > >> How do I assign the RTF(D) in NSPasteboard to my NSTextView >> *programmatically*? > > Deserialize the data off the pasteboard, and mutate the text view's > associated text storage. Undo events will be logged correctly, but you may > want to set the undo group name to be a bit more descriptive. > > Hope that helps, > --Kyle Sluder > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/unmarked%40gmail.com > > This email sent to unmar...@gmail.com > -- Mark Munz unmarked software http://www.unmarked.com/ _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com