Node:Developer tips, Previous:Symbolic interface, Up:Writing scripts

Hints and tips for script developers

`Live' menu entries

In order to eliminate the need to shutdown, startup, and then make selections from the menus every time a change is made to a script under development, you can create a script which reads another script every time it is invoked. This way any changes made to the latter script will manifest themselves immediately, speeding up the development cycle.

Suppose your development script is /path/to/dev_script (this can be anywhere at all in the filesystem). You can create a menu entry Dev. test to load and run this script by putting the following lines into a file called ~/.gnubik/scripts/dev-test.scm

(define (run-dev-test)
   (load "/path/to/dev_script")

(gnubik-register-script "Dev. test" "run-dev-test")

and then restarting GNUbik. Note that run-dev-script-proc is the name of the procedure you would normally have run directly from the menu (i.e. it is the one you would have passed to gnubik-register-script).