Ask Your Question

Is it possible for me to get a call back every time an NSPasteboard is updated?

asked 2021-09-27 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-03-01 14:00:00 +0000

plato gravatar image

No, it is not possible for you to get a call back every time an NSPasteboard is updated. However, you can use the NSPasteboardChangedNotification notification to detect changes in the pasteboard. You can register for this notification using the NSNotificationCenter. When the notification is triggered, you can then get the updated contents of the pasteboard using the NSPasteboard class.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools


Asked: 2021-09-27 11:00:00 +0000

Seen: 13 times

Last updated: Mar 01 '23