• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSPasteboard -> NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPasteboard -> NSTextView


  • Subject: Re: NSPasteboard -> NSTextView
  • From: Mark Munz <email@hidden>
  • Date: Sat, 3 Oct 2009 14:26:36 -0700

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 <email@hidden> wrote:
> On Oct 3, 2009, at 12:59 PM, Knut Lorenzen <email@hidden> 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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden
>



--
Mark Munz
unmarked software
http://www.unmarked.com/
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSPasteboard -> NSTextView (From: Knut Lorenzen <email@hidden>)
 >Re: NSPasteboard -> NSTextView (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Auto Install Login Item
  • Next by Date: Re: Auto Install Login Item
  • Previous by thread: Re: NSPasteboard -> NSTextView
  • Next by thread: main nib, firing a secondary nib and it's controller....
  • Index(es):
    • Date
    • Thread