Page 1 of 1

Can someone take a look at this please?

Posted: Fri Oct 04, 2013 6:37 pm
by abuttino
I am getting some type of UI error on this:
14:34:48 File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
14:34:48 self.Configure(*args, **kwargs)
14:34:48 File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
14:34:48 treeItem.Configure(*args)
14:34:48 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
14:34:48 return self.executable.Configure(*args)
14:34:48 File "C:\Program Files (x86)\EventGhost\plugins\ISYEvent\__init__.py", line 560, in Configure
14:34:48 style=wx.SL_HORIZONTAL )
14:34:48 File "wx\_controls.pyc", line 2661, in __init__
14:34:48 TypeError: in method 'new_Slider', expected argument 3 of type 'int'
14:34:48 Traceback (most recent call last) (1610):
14:34:48 File "wx\_core.pyc", line 14660, in <lambda>
14:34:48 File "C:\Program Files (x86)\EventGhost\eg\Core.py", line 197, in Notify
14:34:48 listener(value)
14:34:48 File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 844, in OnNodeSelected
14:34:48 path = node.GetPath()
14:34:48 File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 368, in GetPath
14:34:48 path.append(parent.childs.index(item))
14:34:48 AttributeError: 'NoneType' object has no attribute 'childs'


Thank you very much for the help in advance..

Here is the plugin:

Re: Can someone take a look at this please?

Posted: Sat Oct 05, 2013 5:59 am
by Pako
abuttino wrote:I am getting some type of UI error on this:
...
Thank you very much for the help in advance.
I wanted to help you, but I can not.
In your file is absolutely disastrous way of indenting.
A small example:
badIndentation.png
It is unacceptable somewhere to use tabs and else spaces.
Please unite the indentation and then I will be able to help you.
But it is quite likely that then your problem will disappear.
BTW - I recommend using Programmer's Notepad for editing.
I personally use 4 spaces for indentation. Editor automatically inserts spaces instead of tabs.

Pako

Re: Can someone take a look at this please?

Posted: Sat Oct 05, 2013 3:25 pm
by abuttino
I usually use Notepad ++, but I didn't build the base of this plugin..

Re: Can someone take a look at this please?

Posted: Sat Oct 05, 2013 8:19 pm
by abuttino
You were right, the Tabs were messing it up.. I fixed them in that area and it started working...

I wish I understood more python, I'd know what's supposed to be indented and what isn't.

Re: Can someone take a look at this please?

Posted: Sun Oct 06, 2013 5:28 am
by krambriw
This is a good guide I try to follow
http://www.python.org/dev/peps/pep-0008/

I'm not perfect all the time myself but...it is a good guide