fix reflection error by making onClose method accessible from OSXAdapter

fixes issue 133
master
melvin 2013-06-08 10:00:07 +08:00
parent 5917b2a664
commit a3630903cf
1 changed files with 2 additions and 2 deletions

View File

@ -600,7 +600,7 @@ public class MagicFrame extends JFrame implements ActionListener {
try {
// Generate and register the OSXAdapter, passing it a hash of all the methods we wish to
// use as delegates for various com.apple.eawt.ApplicationListener methods
OSXAdapter.setQuitHandler(this, getClass().getDeclaredMethod("onClose", (Class[])null));
OSXAdapter.setQuitHandler(this, getClass().getDeclaredMethod("onClose"));
//OSXAdapter.setAboutHandler(this, getClass().getDeclaredMethod("about", (Class[])null));
//OSXAdapter.setPreferencesHandler(this, getClass().getDeclaredMethod("preferences", (Class[])null));
//OSXAdapter.setFileHandler(this, getClass().getDeclaredMethod("loadImageFile", new Class[] { String.class }));
@ -611,7 +611,7 @@ public class MagicFrame extends JFrame implements ActionListener {
}
}
private boolean onClose() {
public boolean onClose() {
if (!config.isConfirmExit()) {
exit();
} else {