Re: Getting notified when the contents of the pasteboard changes
Re: Getting notified when the contents of the pasteboard changes
- Subject: Re: Getting notified when the contents of the pasteboard changes
- From: Sam Taylor <email@hidden>
- Date: Thu, 9 Jan 2003 22:50:15 +0000
Hello,
I am pretty sure there is no 'official' way of doing it. +poseAsClass
will only work within your own application (all other applications will
still be using the standard NSPasteboard class).
The only way to do this (I think) is to use something like Application
Enhancer from Unsanity. The SDK is somewhere on their website at
www.unsanity.com. This allows you to load bundles of arbitrary code
into other applications, as well as patching functions. You could make
a bundle that patches all the carbon and cocoa pasteboard calls to find
out what is happening. APE will then load this bundle inside all other
applications. The bundle will have to have some way of communicating
back with your application (maybe distributed notifications, but I
don't know whether that'll work from within Carbon applications).
Of course, Apple doesn't support any of this, and it defeats the
purpose of protected memory, so use at your own risk...
Sam Taylor
On Thursday, January 9, 2003, at 07:46 pm,
email@hidden wrote:
Hi,
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?
For my purposes it wouldn't suffice to reload the data from the
pasteboard on a timer or when the app is switched to, or anything
like that... I want to get every change. If there is no built-in way
of doing it (and I suspect there isn't since other people haven't
found it) could it perhaps be done by overriding declareTypes:owner:
and using +poseAsClass?
--
Angela Brett
email@hidden
http://acronyms.co.nz/angela
_______________________________________________
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.