ide_append_tool_menu_item(+quoted_atom, +quoted_atom, +quoted_atom)

This built-in predicate adds a menu item to the 'Tools' menu of the main window of the IDE of Trinc-Prolog. The first argument is the string used for the menu item. A '&' character in this string has the effect that the character following the '&' character is underlined and becomes the keyboard shortcut for the menu item. The second argument is the name of the file containing the Prolog program and the last argument is the Prolog goal that starts the program.

The 'Tools' menu can be used to integrate Prolog programs into the IDE of Trinc-Prolog.

arrow.gif (1632 bytes) This predicate is only available in the IDE version of Trinc-Prolog, the DLL and virtual machine do not contain this predicate.

see also: app_dir/1 exists_dir/1 exists_file/1 ide_open_file_in_textedit/1 ide_open_file_in_textedit/3 split_fn/2

Examples
ide_append_tool_menu_item('&DBExplorer', 'c:\\temp\\dbexpl.txt', 'start.') a menu item with the text 'DBExplorer' is created in the 'Tools' menu of the IDE of Trinc-Prolog, if this menu item is selected the file 'c:\\temp\\dbexpl.txt' is loaded, compiled and the goal 'start.' is executed.

pl_img97.gif (2496 bytes)

 

Exceptions
An argument is an empty variable an instantiation_error exception is thrown
The argument Arg is not an atom enclosed by single or double quotes a type_error(atom_singlequotes, Arg) exception is thrown

 

 

info@trinc-prolog.com