- Code: Select all
closedActionConfigUi
closedDeviceConfigUi
closedDeviceFactoryUi
closedEventConfigUi
closedPrefsConfigUi
closedActionConfigUi
closedDeviceConfigUi
closedDeviceFactoryUi
closedEventConfigUi
closedPrefsConfigUi
jay (support) wrote:However, I believe that if you specify an actionId for the menu item's ConfigUI (rather than specifying the full UI)
validateActionConfigUi
validateDeviceConfigUi
validateDeviceFactoryUi
validateEventConfigUi
validatePrefsConfigUi
validateSerialPortUi
<MenuItem id="menu2">
<Name>Start Timer...</Name>
<ConfigUI actionId="startTimer"/>
</MenuItem>
jay (support) wrote:Rather than building the whole ConfigUI for a menu, you can optionally specify an Action type ID, and the menu will use that for it's config dialog:
Colorado4Wheeler wrote:Can you reference a hidden action in that way without any problems?
<MenuItem id="test_menu">
<Name>Test Menu Name</Name>
<CallbackMethod>test_menu_callback</CallbackMethod>
<ConfigUI>
<Field id="field_one" type="menu">
<Label>Field 1 Label</Label>
<List>
<Option value="2">2</Option>
<Option value="1">1</Option>
</List>
</Field>
</ConfigUI>
<ButtonTitle>Save</ButtonTitle>
</MenuItem>
def test_menu_callback(self, values_dict, menu_id):
error_msg_dict = indigo.Dict()
if 1 != 2:
error_msg_dict['field_one'] = u"This is a test error."
error_msg_dict['showAlertText'] = u"Test Error.\n\nThis is a test of validation code within a callback."
return False, values_dict, error_msg_dict
else:
return True
Users browsing this forum: No registered users and 0 guests