Can closedDeviceConfigUi update changes to Config dev?

Posted on
Tue Mar 22, 2016 12:52 pm
zurich offline
Posts: 103
Joined: Aug 11, 2014

Can closedDeviceConfigUi update changes to Config dev?

Greetings,

After I make change to device prefs in Configure myDevice I have the method closedDeviceConfigUi run updateDeviceStates() to update for the changes made in Configure myDevice. The problem is updateDeviceStates() is not seeing the changes made unless I reload the plugin.

Is there a way to have Configure myDevice changes incorporated when closedDeviceConfigUi runs or closes?

Kind regards?

Z

Posted on
Tue Mar 22, 2016 3:04 pm
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Can closedDeviceConfigUi update changes to Config dev?

No. That method is the final one called in the lifecycle of the dialog, and as such the valuesDict has yet to be saved.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Mar 22, 2016 6:12 pm
zurich offline
Posts: 103
Joined: Aug 11, 2014

Re: Can closedDeviceConfigUi update changes to Config dev?

Greetings,

So if a change is made to the device prefs in Configure myDevice, the only way for them to take effect is to reload the plugin?


kind regards,

Z

Posted on
Tue Mar 22, 2016 6:56 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Can closedDeviceConfigUi update changes to Config dev?

For the device states I believe you'll need to move it outside the scope of that callback. The problem is the device API isn't really ready to accept state changes inside that API because the device is still being defined (or edited). If the user has changed any of the device properties (valuesDict), then your deviceStartComm() callback will be called (unless you've overridden didDeviceCommPropertyChange) after the dialog is closed so that can be a good place to update device states.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests