Friendlier way to launch Grovvy script in IJC

User 55ffa2f197

17-10-2012 12:04:44

Hi Erin,


Currently to execute a Grovvy script in IJC is to locate the script in script folder under a data tree, click on it and run it. If the script using SwingBuilder to provide a simple/complex UI for user interaction the UI is not docked such as a form view does. This entire way of execution and UI interaction is not very user friendly.


Is it possible to force the execution of the Grovvy script by way of launching a form, such that the script is attached to the form, and form does nothing but as a handle to launch the script, user does not have to go down the script folder and find exceutable script.


If we can do so I would assume the UI created through swingBuilder might be able to dock inside the form view, so that it is nicely integerate with the IJC UI, instead of like an orphane to flow around.


I think as we getting serious with delivering useful Grovvy UI interface the userfrienliness of execution envrionment is something to be improved upon.


Thanks


Dong 

ChemAxon 8da0306fb7

29-10-2012 21:36:25

Hi Dong,


My apologies for the late reply! This fell through the cracks.


Currently there isn't a way to directly attach a script to a form, so having one launch automatically would require development work on this side. However, I think you'll be able to fake it. Buttons have an initialization setting that is run when the button initializes (the form opens). You could create a button with no border, and perhaps just a * as the title, and put the UI script in the init section of the button script. This will launch the script each time the form is initialized. I haven't tried this yet, so start with a simple bit of code that does a SwingBuilder pop-up, or something else you have that won't require much investigative time. 


The default script with a button will have the init section you can work with.


Good luck!


Erin