[wingide-users] bug in wingapi.py
Wingware Support
support at wingware.com
Wed Jan 10 13:31:03 MST 2007
On Wed, 10 Jan 2007, Christian Muirhead wrote:
> While working on a script, I noticed that there was a bug in
> wingapi.CAPIEditor.__SelectionChanged - it says
>
> def __SelectionChanged(self):
> def forward(editor, start, end):
> self.emit('selection-changed', start, end)
> id = self.fEditor.connect('selection-changed', state_change)
> return self.fEditor, id
>
> It looks to me like the 3rd line of the method should be
>
> id = self.fEditor.connect('selection-changed', forward)
Yes, that's a typo. I've corrected it in our sources and will
look into adding a unit test for it and other signals which
I think may also be outside of the test coverage right now.
> I've caught an exception in a script when trying to scroll, which looked
> like this:
>
> Traceback (most recent call last):
> File "C:\Program Files\Wing IDE
> 2.1\scripts\custom_execute_to_window.py", line 38, in DisplayOutput
> editor.ScrollToLine(doc.GetLineCount() - 1, select=1, pos='top')
> File "C:\Program Files\Wing IDE 2.1\bin\wingapi.py", line 954, in
> ScrollToLine
> self.fEditor.ScrollToLine(lineno, select, pos)
> File "2.4/src/edit/editor.pyo", line 1215, in ScrollToLine
> File "C:\src\ide-2.1\bin\2.4\src\guimgr\multieditor.pyo", line 1322,
> in NextBookmark
> ValueError: __fEmissionStack should have 22 entries, but it has 23
> entries instead
>
> Could this have been because the event wasn't hooked up correctly, or is
> this unrelated?
Yes, I think it was due to the exception during signal emission.
Sorry about that!
Stephan Deibel
--
Wingware
Wing IDE for Python
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list