Re: NSPasteboard notifications?
Re: NSPasteboard notifications?
- Subject: Re: NSPasteboard notifications?
- From: Allan Odgaard <email@hidden>
- Date: Sun, 22 Feb 2004 15:28:35 +0100
On 22. Feb 2004, at 12:57, petite_abeille wrote:
Is there a "clean" way to get notified about the NSPasteboard
activities?
No -- but I think it's safe to assume that others will only modify
the pasteboard when your application is inactive [...]
Hmmm... not quite sure if I understand what would be the modus
operandi for checking changeCount in this context...
Sorry, I thought you was writing an application and wanted to learn
when others placed something on the pasteboard.
(2) This change also gets broadcasted to all other running
applications to update their list of externally modified pasteboard
values.
You could instead report to a server and have each application poll the
server when that particular application goes active -- that should
solve the problem someone reported about cmd-c being slow (because it
had to activate code from all running applications).
All this works reasonably well, even though I have the nagging
suspicion that this could be achieved in a much more straightforward
way.
Ideas? Alternatives?
I think you have surpassed all previous attempts of global pasteboard
history! I hope you will place this tool in the public domain :)
I have two question though, what do you do when someone only makes a
promise of a declared type? I generally do that because the data might
be very large, and will most likely only be pasted in the same
application.
And what about when multiple representations exist? I sometimes keep a
private representation of my data on the pasteboard, but when my
application quits I remove this representation (by overwriting the
pasteboard), since the extra information might be session-dependent.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.