Next Previous Up Contents
Next: Run System Command
Up: Activation Actions
Previous: Delay
Configuration for Execute Code action
The Execute Code action can execute arbitrary
code using the expression language described in Section 7.
Most of the expressions and functions just evaluate an expression,
and in that case the only effect is that the result of the
expression is displayed in the Results panel
at the bottom of the activation window every time a row is activated.
However, some functions are defined especially for use in this window,
and have some additional effect such as popping up a
viewer window, writing output to the console, or downloading a file.
These are listed below.
In principle, this window can provide very flexible options for
defining your own activation actions.
In practice, the available activation functions don't give you
much more sophisticated options than what is available in the other
activation types. However, some more flexible options may be
added in the future, and it is also possible to implement your own
as explained in Section 7.10.
Note that another option for configuring your own custom actions
is to use the Run System Command
to invoke a shell script or similar with supplied arguments.
Configuration:
-
Executable Expression
- Type in the expression to be evaluated on row activation.
Column names act as variables which evaluate to the column value at
the activation row, as explained in Section 7.
The result of the expression is displayed in the Activation Window
Results panel, but there may be other effects as well
depending on the functions invoked.
The expression is parsed as it is typed in, and if the current text
does not represent a legal expression, the action is disabled,
and an error message is displayed in the Status panel
that should help to understand what's wrong.
-
Synchronous
- This checkbox determines whether the expression is evaluated on
the Java Event Dispatch Thread or not.
You can usually leave it alone, but if the expression is known to be
fast to evaluate, multiple evaluations may behave a bit more
predictably with it checked. For slow expressions, it should be
unchecked (its default state).
The available Activation Functions
(ones that have some effect other than just returning a value)
are summarised below, and listed in detail in Appendix B.2.
You can also browse them interactively in the
Activation Functions branch of the
Available Functions Window.
Note some of these offer rather out of date functionality,
and may be withdrawn (replaced by better alternatives)
in future releases.
-
BasicImageDisplay
-
Functions for display of graphics-format images in a no-frills
viewing window (an
ImageWindow
).
-
Browsers
-
Displays URLs in web browsers.
-
Image
-
Functions for display of images in a window.
-
Mgc
-
Specialist functions for use with data from the the Millennium Galaxy
Survey.
-
Output
-
Functions for writing text to standard output.
-
Sdss
-
Specialist display functions for use with the Sloan Digital Sky Server.
-
SuperCosmos
-
Specialist display functions for use with the SuperCOSMOS survey.
-
System
-
Functions for executing shell commands on the local operating system
and other system-level operations.
-
TwoQZ
-
Specialist functions for use with data from the the 2QZ survey.
Invoking certain activation functions configured by an unknown party
has security implications.
If this action is loaded from a session file,
the security panel will be shown.
Next Previous Up Contents
Next: Run System Command
Up: Activation Actions
Previous: Delay
TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page:
http://www.starlink.ac.uk/topcat/
Author email:
m.b.taylor@bristol.ac.uk
Mailing list:
topcat-user@jiscmail.ac.uk