Re: How to copy something to the pasteboard in a service call
Re: How to copy something to the pasteboard in a service call
- Subject: Re: How to copy something to the pasteboard in a service call
- From: Graham Cox <email@hidden>
- Date: Sun, 18 Apr 2010 22:54:13 +1000
On 16/04/2010, at 4:41 PM, Kay Jurkuhn wrote:
> Hi list!
>
> I'm implementing an application service. The desired result of the action is to copy a string to the pasteboard.
> But as the communication between caller and called service goes via the pasteboard the caller will delete
> the content of the pasteboard at the end of the call.
>
> What would be the best way to keep my string on the pasteboard publicly accessible after the call?
>
> Set up a timer?
Application services communicate through *A* pasteboard, not through *THE* pasteboard. From the introduction to services:
"Services are performed by transferring data back and forth between applications through a shared pasteboard. Note that the two applications—service requester and service provider—are completely separate; they do not run in a shared memory space. The pasteboard holding the data is specific to the service request and does not normally interfere with the standard Copy/Paste pasteboard."
So you can place your string on the services pasteboard you're passed and the general pasteboard for normal use.
--Graham
_______________________________________________
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