Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

XUL Script helper and context


The global context and helper are available in all the XUL scripts.

The context is available through the context field in your script. For example:
      public void clicked() {
         context.echo("Hello World");
      }
The script helper is available through the helper field in your script. For example:
      public void clicked() {
         XULWidget widget = helper.getCurrentWidget();
      }

Example

For example to show a message on the framework logger in a Groovy script:
      public void clicked() {
        context.echo("My value:" + value);
      }
To get the current widget in a Groovy script:
      public void clicked() {
         XULWidget widget = helper.getCurrentWidget();
      }

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence