MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

updated OptionsExplorer


I have rewritten OptionsExplorer to have the similar properties as the menu
command Complete Selection.
It adds interactively the options to the function selected in the edited
The options can be selected and inserted via keyboard or mouse actions.

The basic properties include:

1. To activate the dialog the full expression completely or its head should
be selected.
The dialog will be activated too if the cursor is on the head of the
expression of at the end of expression.

2. The dialog will be launched only if the head of the expression has the
via menu Edit > Insert Options or keyboard shortcut Ctrl-m.

3. Keyboard commands
- the number keys and space select/unselect the options.
- up and down arrow keys change the currently selectable by space key
- escape key closes the dialog window.
- return key inserts the selected options into the expression.

4. Mouse clicks:
- option name selects/unselects the option
- option value opens the list of possible values
(requires AlternativeOptions settings;
the prsence of the alternative values is shown by DownPointer sign)
- rule sign changes the option head between Rule and RuleDelayed
- question sign opens help window (and closes OptionsExplorer dialog)
- click outside OptionsExplorer dialog window closes it

5. Settings of the function AlternativeOptions can be used to add
alternative values to the options.
For example if the function f has the options {method -> Automatic,
the evaluation AlternativeOptions[f, method->1|2,extra1->All]
adds two more alternative values to the option method and one extra value
to the option extra1.
Note, OptionsExplorer automatically adds the alternatives to the values
True or False.

Unsolved problems:

1. The keyboard commands may lead to Mathematica internal error and close
the dialog.
This should relate with the work of the values of the dialog option
but I could not find a reasonable solution.
2. I couldn't find a good solution to fit the OptionsExplorer dialog window
to the edited window or to the screen.
3. It would be nice to make possible the selection of the option value via
keyboard command.
Currently I have no idea how to add this functionality.
4. The front end manipulations seem to be slow and it would be nice to find
a better behaior of the functions Dynamic.
5. I couldn't get worked with the localization of the function "boxes" (see
source code).

To prevent the generation of the multiple menu items "Insert Options"
after the Kernel reloading I have placed init.m file with the line
in the Autoload directory of the $UserBaseDirectory

The file can be downloaded from

Yuri Kandrashkin

  • Prev by Date: Re: Sending an interrupt to the frontend?
  • Next by Date: Re: Algorithm Analysis Course: Should I use Mathematica for projects?
  • Previous by thread: Need to run Mathematica 5.2 on Windows 7 64-bit
  • Next by thread: SendMail with multiples receives