Hi all, I’m trying to develop a package that keeps tainted files as it is. So there shouldn’t be any prompt asking “Do you want to save the changes?”
I have figured out the chain of delegation. It starts from
ipc.send("call-window-method", "close"), and the prompt window particularly is in pane class
Now, how should I achieve what I want to - add my cusom event handler for the window-close event, alongside other handlers. Disable not all event handlers but only the promptToSaveItem behaviour.
I can think of a few candidates that might NOT be good practices, like touching the pane class itself and replace its
@promptToSaveItem method, which is a violation of https://en.wikipedia.org/wiki/Open/closed_principle.
I’m new to the community. Bear with me if I asked something obvious. Thanks in advance!