Difference between revisions of "DispatchAction"

From Moving Light Assistant
Jump to: navigation, search
(Created page with "'''DispatchAction( action, optionalParameter )''' ''action is a string.'' ''optionalParameter is a string (only some actions require the optionalParameter).'' This function...")
(No difference)

Revision as of 00:50, 30 May 2014

DispatchAction( action, optionalParameter )

action is a string.

optionalParameter is a string (only some actions require the optionalParameter).

This function sends a user interface action to the Preset Documentation view. These actions would normally by triggered by clicking on the user interface, i.e. clicking on a toolbar button, or selecting a Preset in the Preset table.

Example.

PresetDocView:DispatchAction("Take Photo") This would send an action that would be the same as clicking on the camera (Take Photo) button.

PresetDocView:DispatchAction("Set Channel Focused Flag", "True") This function with an optional parameter would be the same as clicking on the focussed checkbox for a channel.

Action Strings

Take Photo

This action would be the same as clicking on the camera (Take Photo) button. It will behave in the same way, in that it will add the photo to the Preset if the photo mode is set to Preset, and to a Channel if the photo mode is set to Channel. It will fail in the same way as if you clicked on the button if there are insufficient available photos (the maximum is 4 for a Preset or a Channel).