Re: Getting notified when the contents of the pasteboard changes (again)
Re: Getting notified when the contents of the pasteboard changes (again)
- Subject: Re: Getting notified when the contents of the pasteboard changes (again)
- From: Andreas Mayer <email@hidden>
- Date: Fri, 10 Jan 2003 00:06:28 +0100
Am Donnerstag, 09.01.03 um 10:58 Uhr schrieb Angela Brett:
I've seen at least two people ask this on the list before, and I don't
think they got any answers, but maybe with new versions of the OS
there is finally a way to do this now. Is there a way to be notified
whenever the contents of the generalPasteboard changes?
Short answer: No.
Am Sonntag, 05.01.03 um 20:54 Uhr schrieb Greg Titus:
Hi Ben,
As the other reply mentions, the answer is no, there aren't
notifications. If you absolutely must poll the clipboard contents
periodically for changes, though, you can at least use the
-changeCount method to quickly see if the pasteboard has changed since
the last time you checked, instead of actually examining the data
every time.
Hope this helps,
- Greg
On 23 Apr 2001, Chris Kane wrote
Functionality (private) like this used to exist. It turned out to be
a bad idea for system/app performance.
What happened was that eventually, essentially every app was
interested in some aspect or other of the general pasteboard (and
others to a lesser extent), so every time the user did a cmd-C, in
addition to the normal work that goes on, the pasteboard server had to
send every "observer" app for that pasteboard a message noting the
change, and every app received it, woke up, swapped in a bunch of code
and data to process the message, etc.
Chris Kane
Cocoa Frameworks, Apple, Inc.
bye. Andreas.
_______________________________________________
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.