GUIKIT 程序包 教程

Wolfram Workbench Support for GUIKit

The Wolfram Workbench is a development environment for the Wolfram Language. Some of its features include the following.

  • Wolfram Language editor with syntax highlighting, local variable coloring, mark occurrences, code folding, and documentation hovers
  • Code formatting
  • Unit testing support for the Wolfram Language, test runner GUI, editor support for writing tests, and quick fixes for editing testing files
  • Code browsing (find definitions for functions)
  • Auto-complete for function names and function templates
  • Quick fixes for common tasks, such as renaming symbols, creating packages, and exporting symbols
  • Code analysis: checks for problems such as the wrong number of arguments
  • Full GUI debugger for the Wolfram Language, with code breakpoints, message breakpoints, and symbol breakpoints as well as stack, code, and local variable display
  • Wizards for creating projects and importing code
    • Support for profiling, webMathematica, gridMathematica, GUI toolkit, and specialized code searching

    The Workbench contains a number of useful features for working with GUIKit. These include creating Wolfram Language applications that contain GUI definitions and helping you to develop your GUI with debugging tools.

    The following shows a GUI application in a project in the Workbench.

    Sample GUIKit project shown in the Workbench.

    You can add the location of GUIs defined in your application so that when you run your project they can be loaded by commands such as GUIRun or GUIRunModal. This is done with a Workbench project settings inspector that adds the location of GUI definitions from the project to the GUIKit path. This is demonstrated below.

    Project settings inspector that adds GUI definitions.


When you run your project in a debug mode, you can set breakpoints in script definitions. When you interact with the GUI and reach code that has a breakpoint, the Workbench will enter a breakpoint display. This shows you the different stack frames and their source code as well as other useful information such as local variables and their values. In this way you can inspect the state of the Wolfram System as it runs your GUI; this lets you correct problems and can be very valuable in developing your user interface. A sample of a Workbench debugging session is shown below.

Sample Workbench debugging session for a GUI.