Page 1 of 1

What is behind PB_Gadget_SetOpenFinderFiles()?

Posted: Fri Nov 15, 2019 5:41 pm
by Kukulkan
Hi,

you maybe know the PB_Gadget_SetOpenFinderFiles() function used to get MacOS Cocoa events for files to be opened by your application.

Is there someone who can tell me what is behind? What Cocoa methods to call to get such result by myself?

I'm also interested in the Cocoa details about how to get notified if a user clicks on the Dock icon of my program.

Re: What is behind PB_Gadget_SetOpenFinderFiles()?

Posted: Sat Nov 16, 2019 7:41 am
by wilbert
Kukulkan wrote:you maybe know the PB_Gadget_SetOpenFinderFiles() function used to get MacOS Cocoa events for files to be opened by your application.

Is there someone who can tell me what is behind? What Cocoa methods to call to get such result by myself?
If I remember correctly, what's behind it is the application:openFiles: method of NSApplicationDelegate .
Unfortunately you can't get the result yourself because by the time you can set a delegate using CocoaMessage, the method already has been called.