I want to present a modal window that contains a list of buttons that perform tasks. When a user clicks the button, the window should close and the task executed.
Dialog windows in JMP are designed to work with OK and Cancel buttons, but it looks like it ought to be possible to extend the dialog to other buttons. When a button is clicked it generates a call to a function called Dismiss. I have implemented a function with this name and can correctly identify the button that was clicked. However, I need to then close the window, and I don't know how to do this.
The reason that I need a modal dialog (apart from the fact that logically the operation is modal) is that the main application is running with a maximised window - and with MDI if one window is maximised then they all are (with the exception of modal windows).
You could do something like this where you would replace the "print" statements with either your code or "include" statements that point to your code. My opinion would be to use include statements to keep the code cleaner.
Regarding your comment about keeping the code clean - you can achieve that by using a function definition for the button scripts.
I appreciate your response - my issue is that I want to be able to define buttons on a modal window. These are generated using the Dialog function as opposed to the New Window function, and have different behaviour because of their modality.