Re: [Pyobjc-dev] Anyone looking for a toy project?
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2003-11-19 15:54:11
|
On Nov 19, 2003, at 5:20 AM, Jack Jansen wrote: > Apparently it is currently windows-only, but I would love to have > functionality like this cross-platform. > And I think on MacOSX we could put it in the Services menu with PyObjC. See: http://apple.slashdot.org/apple/03/04/09/134204.shtml?tid=182 There are ways to monitor the pasteboard and automatically detect changes. So, for inbound changes it is just a matter of calling declareTypes:owner: on the NSGeneralPasteboard, then pushing the new data onto the pasteboard. For outbound changes-- for a copy action on some other app on the OS X system-- you will need to catch the change in a fashion similar to one of the apps mentioned in the above thread and push the change out across the wire. This has the advantage of being transparent/automatic -- would not require user intervention via the Services menu. nsRemotePasteboard has the disadvantage of polling. It looks like from the API of NSPasteboard that it may be possible to receive notifications automatically whenever the pasteboard changes. I am not familiar with the Carbon clipboard/pasteboard APIs. There may be something there that can do the automatic notif? b.bum |