I currently have some code in my save button's listener but I have now written logic to check if there are unsaved changes. My question is would it be considered bad coding to simply call the save's doClick function or should I put the code from the save button in it's own function and then call that function from the save button and from the closing of the window ?
Thanks In Advance
posted 7 years ago
My suggestion (which is more or less your second approach) can be found in the Closing An Application entry. Basically you create a Save Action that is invoked by a CloseListener. So your Save button would simply use the ExitAction provided in the blog to close the window.
I do some of my very best work in water. Like this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads