denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] Dynamic creation of menu items for Scheme scripts.


From: Richard Shann
Subject: [Denemo-devel] Dynamic creation of menu items for Scheme scripts.
Date: Sat, 23 Aug 2008 17:35:21 +0100

I've just pushed the next bit of the Scheme scripting scheme.
Now, as well as recording/writing a script, you can create a menu item
anywhere in the menu system that invokes the script. The new menu item
has label, command name, tooltip of your choice.
Minor limitations - some menu systems have been omitted (e.g. Action
menus) and the new menu item is always last in the menu.
Major limitation: you cannot save the menu item and restore.
Without this, it is still all virtually useless.

This is the point where I started my paper and pencil work while I was
in hospital. How to save/restore scripts as menu items in your menu
system.
I worked through the whole of self-installing scripts, and basically
reached the same conclusion as in my earlier emails (thread Custom
Menus). Although it can be done, managing the data (text of Scheme
script, command name, menu location, keyboard shortcut, menu label)
would become a nightmare unless the information is collected in one
file.
So my proposal, broadly outlined before, is to have a single file - a
commands file - containing references to built-in commands plus Scheme
scripts and all the other stuff mentioned above. This would be loaded on
startup, and the user could delete/augment it as desired and write out
his own custom commands file on close. A library of scripts could be
available for merging with the user's current commands file. These would
themselves be commands files, and once we have a significant user base I
imagine these growing (& needing managing, to avoid the needle in
haystack problem).
One example would be the educational use: a library of music lesson
scripts - load one in and most of the commands are hidden, there is just
the script to run the lesson. The lesson could be learning the notes on
the keyboard - Denemo presents a note, and then listens for that note on
the mic input if you are quick you get a little tune to celebrate. It
could be almost anything...
One of the things you would want for this is the ability to hide menu
items, even starting Denemo up with a flag to lock out creating scripts
etc, so that the kids can get on with the music lesson without stumbling
into unknown territory (by accident or otherwise:-)
Richard







reply via email to

[Prev in Thread] Current Thread [Next in Thread]