Purpose of HandlerMenu tool xtra for Director
Use this movie in your Director Xtras folder to list all handlernames of all scriptmembers in your director movie in a hierarchical menu. Unlike Directors own handler menu, this tool lists not only Moviescript handlers, but rather all three types of scripts:
- Movie
- Score
- Parent
The different types are subdivided into own submenus. Unlike Directors handlername menu the handlers are not listed all in one single menu, but they are categorized by the scriptmembers, they appear in.
You can do three types of things with each entry: Execute the command (default), reveal it in the script or copy the syntax into the clipboard, so you can paste it whereever you are in your script.
There's also a submenu which lists the scripts used by the sprites in the current frame. So you can quite easily send an event to a sprite on stage. Note, that the scriptlist is used, rather than the scriptinstancelist for two reasons: It exists, if the movie is not running and querying the scriptinstancelist of a sprite with an empty scriptinstancelist puppets the whole channel and makes it unresponsive furtheron. As the script goes through each sprite to build the list this could only be avoided using the D10 syntax "makeScriptedSprite". I decided to go with the scriptlist, which has the downside of not listing dynamically added behaviors, but hey... ;-)
Another important difference is, that handlers get executed by default and only the use of a modifier key either shows the occurrence in the script editor (Option/Alt key) or copies the syntax into the clipboard (Shift key).
So this tool provides an easy way of using your own scripts for authoring without needing to remember the names and type the same handlernames over and over again into the message window. It provides also a way to sendSprite() events, by simply selecting the event from the menu and entering the parameters in an upcoming dialog.
As it scans all your scripts, each time it is invoked, it has a delay, when opening, at the benefit of always reflecting the latest changes to your scripts. (I plan to check the modified time in order to cache results and improve performance).
There is also a search field which constrains the displayed handlernames to match the querystring. So if yoy for example know, that your handler has something with "mouse" in its name, try entering "mouse" as searchstring and invoke the menu again. Now only handlernames containing the string "mouse" will be listed. This is particularly helpful in conjunction with the SHIFT key (copyToClipboard) to avoid misspelled handlernames, as you do not need to remember them exactly.
