There isn't a closedMenuActionConfigUi?

Posted on
Fri Jul 27, 2018 11:29 am
Colorado4Wheeler offline
User avatar
Posts: 2715
Joined: Jul 20, 2009
Location: Colorado

There isn't a closedMenuActionConfigUi?

This seems to be missing from the PluginBase, is there a different method that is raised when someone cancels or closes out of a menu action other than the button action? I only see the following methods:

Code: Select all
closedActionConfigUi
closedDeviceConfigUi
closedDeviceFactoryUi
closedEventConfigUi
closedPrefsConfigUi

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Jul 27, 2018 1:15 pm
jay (support) offline
Site Admin
User avatar
Posts: 14658
Joined: Mar 19, 2008
Location: Austin, Texas

Re: There isn't a closedMenuActionConfigUi?

No, because menu actions never validate UI on closure, so neither validate nor closed methods exist for them.

However, I believe that if you specify an actionId for the menu item's ConfigUI (rather than specifying the full UI), the validate method for the action dialog is called. It's possible the closed method is called as well, but I'm less sure about that.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 27, 2018 1:38 pm
Colorado4Wheeler offline
User avatar
Posts: 2715
Joined: Jul 20, 2009
Location: Colorado

Re: There isn't a closedMenuActionConfigUi?

jay (support) wrote:
However, I believe that if you specify an actionId for the menu item's ConfigUI (rather than specifying the full UI)

I'm not sure I"m understanding what you mean by that.

But, once I understand what you mean by that, that means that even though validateMenuActionConfigUi doesn't exist here:
Code: Select all
validateActionConfigUi
validateDeviceConfigUi
validateDeviceFactoryUi
validateEventConfigUi
validatePrefsConfigUi
validateSerialPortUi

That it might be calling validateActionConfigUi in its place?

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Jul 27, 2018 4:03 pm
jay (support) offline
Site Admin
User avatar
Posts: 14658
Joined: Mar 19, 2008
Location: Austin, Texas

Re: There isn't a closedMenuActionConfigUi?

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:

Code: Select all
   <MenuItem id="menu2">
      <Name>Start Timer...</Name>
      <ConfigUI actionId="startTimer"/>
   </MenuItem>


startTimer is an action in Actions.xml that has a config UI. This allows you to publish actions that can also be run interactively from the plugin's menu without having to duplicate code. In that case, the validateActionConfigUi call will be made.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 27, 2018 4:38 pm
Colorado4Wheeler offline
User avatar
Posts: 2715
Joined: Jul 20, 2009
Location: Colorado

Re: There isn't a closedMenuActionConfigUi?

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:

That's interesting, I didn't know that was possible - a very cool way to provide the functionality in two places without duplicating the code. Can you reference a hidden action in that way without any problems? Honestly I don't want this menu action accessible via actions but want the validate method so if that is what it takes to get it then I'll do that as long as I can hide the action.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Jul 27, 2018 5:00 pm
jay (support) offline
Site Admin
User avatar
Posts: 14658
Joined: Mar 19, 2008
Location: Austin, Texas

Re: There isn't a closedMenuActionConfigUi?

Colorado4Wheeler wrote:
Can you reference a hidden action in that way without any problems?


Probably - give it a try! (I honestly don't know and don't want to dig into the code at the moment)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 27, 2018 5:03 pm
Colorado4Wheeler offline
User avatar
Posts: 2715
Joined: Jul 20, 2009
Location: Colorado

Re: There isn't a closedMenuActionConfigUi?

I'll test it out in the next few days and see what happens. Like you, I don't want to change a bunch of stuff around to test right now ;).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest