[Resuelto] I want to close the open VM using a special Close Button
hiren.ectech has published:
I have just started with Myopenlab, which is a wonderful open IDE with graphical programming.
For my project, I need multiple VMs and a Switch board to launch them as needed.
Now, I want to close the open VM using a special Close Button (not the "X" in the title bar). But I am not able to locate any element which can help me do it.
Your help will be much appreciated.
To Programmatically closes the VM you can use "System Control" > "App_Abort_JV" Element.
That element Closes the Windows if the Boolean Input is True.
There is an example at Projects window of MyOpenLab > "VirtualMachines>English Examples>Application_Control>Abort_App_JV_Example"
You are right, this "ABORT" element was only to close all VMs (Quit the Java VM)....
If you want close only one windows please try with this Preview Element Update attached.
Only replace the .class file at the next folder:
Then start MyOpenLab and you will see three new input pins in the element, the first pin will be to Abort the Java Machine, the second pin will be to Dispose the Window and the third pin will be to set the Window Visible Property equals to the boolean input value (If true or null the window is Visible If False The window will be invisible).
I will test and update the element in the next distribution.
Seems like a bug....
I updated the element as per your instruction, It worked perfectly for a VM if i run it using "Start VM" button. I am able to close the window by pressing a dedicated button on the window (other than "X" in title bar).
However, if I call the same VM in some other VM using subVM element, It doesn't close by pressing the same button.
I have also noted that once the VM is closed, I have to manually stop the execution of the VM.
Need your help to resolve this...
Thanks & Regards,
Try this Preview Update. (It works for Distributions too, but not supports Modal Windows still).