closerequestfnc is a interruptible callback 93/13893/2
Antoine ELIAS [Tue, 4 Mar 2014 10:29:36 +0000 (11:29 +0100)]
Change-Id: I10532178aafbedb0448c6d7ef3edc93579289a6b

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/tab/SwingScilabDockablePanel.java
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/window/SwingScilabStaticWindow.java

index 41e0754..c59a5c5 100644 (file)
@@ -350,7 +350,7 @@ public class SwingScilabDockablePanel extends View implements SimpleTab, FocusLi
                                           + "gcbo = getcallbackobject(" + getId() + ");"
                                           + closeRequestFcn + ";fire_closing_finished();"
                                           + ";if exists(\"%oldgcbo\") then gcbo = %oldgcbo; else clear gcbo; end;";
-                    InterpreterManagement.requestScilabExec(closeCommand);
+                    InterpreterManagement.putCommandInScilabQueue(closeCommand);
                     return -1;
                 } else {
                     closeAction.actionPerformed(null);
index f0cdaae..c4be084 100644 (file)
@@ -37,8 +37,8 @@ public class SwingScilabStaticWindow extends SwingScilabWindow {
                 String closeRequestFcn = (String) GraphicController.getController().getProperty(panel.getId(), __GO_CLOSEREQUESTFCN__);
                 if (!closeRequestFcn.equals("")) {
                     String closeCommand = "if exists(\"gcbo\") then %oldgcbo = gcbo; end;" + "gcbo = getcallbackobject(" + panel.getId() + ");" + closeRequestFcn
-                            + ";if exists(\"%oldgcbo\") then gcbo = %oldgcbo; else clear gcbo; end;";
-                    InterpreterManagement.requestScilabExec(closeCommand);
+                                          + ";if exists(\"%oldgcbo\") then gcbo = %oldgcbo; else clear gcbo; end;";
+                    InterpreterManagement.putCommandInScilabQueue(closeCommand);
                 } else {
                     GraphicController.getController().deleteObject(panel.getId());
                 }