Any other developers have this problem?

Posted on
Fri Oct 19, 2018 4:18 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Any other developers have this problem?

In short, I'm easily confused. :oops:

When writing plugin code, I'm always dealing with Indigo device objects, those things that get created by users and referenced from all the plugin methods.

In most of my plugins, I'm also creating custom Python classes and objects, and usually have a one-to-one correspondence between Indigo devices and my custom device objects.

And then I get confused about which is which at various places in the code and get lots of errors like:

Code: Select all
AttributeError: 'Device' object has no attribute 'authenticated'

Sigh.

Maybe I need to adopt a specific naming scheme to keep the two separate...

And don't even get me started on the different places where the Indigo device ID is integer vs string. :evil:

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

Posted on
Fri Oct 19, 2018 6:02 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Any other developers have this problem?

I am *never* confused.

[Note to self. Plugins have prefs. Devices have props. Learn it, know it, live it.]

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 4 guests