validateDeviceConfigUi/closedDeviceConfigUi not called

Posted on
Mon Feb 27, 2017 2:43 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

validateDeviceConfigUi/closedDeviceConfigUi not called

Stupid simple code. But nothing happens when I create/edit new devices. deviceStartComm is called when I Save from the Device Config dialog, but nothing before that.

Any ideas?

Code: Select all
   def validateDeviceConfigUi(self, valuesDict, typeId, devId):
      self.logger.debug(u'Called validateDeviceConfigUi(self, valuesDict, typeId, devId):')
      self.logger.debug(u'     (' + unicode(valuesDict) + u', ' + unicode(typeId) + u', ' + unicode(devId) + u')')         
      return (True, valuesDict)

   def closedDeviceConfigUi(self, valuesDict, userCancelled, typeId, devId):
      self.logger.debug(u'closedDeviceConfigUi(self, valuesDict, userCancelled, typeId, devId):')
      self.logger.debug(u'     (' + unicode(valuesDict) + u', ' + unicode(userCancelled) + ', ' + unicode(typeId) + u', ' + unicode(devId) + u')')
      return
      

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Feb 27, 2017 2:54 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: validateDeviceConfigUi/closedDeviceConfigUi not called

Hmmmm. Method signatures look right. If you're using PyCharm (or any of the other debuggers), have you tried setting a breakpoint on the first line of each method?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Feb 27, 2017 3:23 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: validateDeviceConfigUi/closedDeviceConfigUi not called

I have a PyCharm license, but I don't have everything set up to use the debugger. I did for Indigo6 at one time. I guess I'm going to have to go back and do that again.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Feb 27, 2017 3:35 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: validateDeviceConfigUi/closedDeviceConfigUi not called

Hmm. Apparently I had a space/tab mismatch issue that didn't report any errors. That's what I get for copy and paste without running the Detab function.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Feb 28, 2017 5:00 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: validateDeviceConfigUi/closedDeviceConfigUi not called

I've seen that too. If I copy code from PyCharm into Indigo, the code throws up. But if I paste the code into BBE and then copy from BBE to Indigo, it works fine. I always figured it was a PyCharm settings issue, but I've never bothered to try to figure out what's causing it.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Feb 28, 2017 2:16 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: validateDeviceConfigUi/closedDeviceConfigUi not called

In Pycharm you can select a python file and use:
Edit > Convert Indents > Spaces
to change all tabs to spaces.

You can set the default tabbing in
PyCharm > Preferences...
:
pycharm_Preferences.png
PyCharm Preferences
pycharm_Preferences.png (71.51 KiB) Viewed 1649 times

Posted on
Tue Feb 28, 2017 4:29 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: validateDeviceConfigUi/closedDeviceConfigUi not called

I'm seeing tabs/spaces, but I'm also seeing CR/LF gremlins.


Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests