dabo Commit
Revision 4531
Date: 2008-09-26 14:11:38 -0700 (Fri, 26 Sep 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4531
Changed:
U trunk/dabo/ui/uiwx/dEditor.py
Log:
Added an AttributeError exception handler in the editor autocompletion code
because of the error below. Some context, I am wrapping a new ui widget, put
it in the init file, however, since I did this after starting the editor, it's
imported libraries don't contain it.
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 1455
5, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "C:\Personal\dabo-full\trunk\dabo\ui\uiwx\dEditor.py", line 1238, in code
Complete
obj = self._getRuntimeObject(self._getRuntimeObjectName())
File "C:\Personal\dabo-full\trunk\dabo\ui\uiwx\dEditor.py", line 1814, in _get
RuntimeObject
self._makeContainingClassIntoSelf()
File "C:\Personal\dabo-full\trunk\dabo\ui\uiwx\dEditor.py", line 1785, in _mak
eContainingClassIntoSelf
exec classdef in self._namespaces
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'dBorderlessButton'
Diff:
Modified: trunk/dabo/ui/uiwx/dEditor.py
===================================================================
--- trunk/dabo/ui/uiwx/dEditor.py 2008-09-26 20:03:13 UTC (rev 4530)
+++ trunk/dabo/ui/uiwx/dEditor.py 2008-09-26 21:11:38 UTC (rev 4531)
@@ -1789,6 +1789,9 @@
except SyntaxError:
# Catch user Syntax errors like no colon after
class def
pass
+ except AttributeError:
+ #Catch errors like module objects not having an
attribute
+ pass
def _getRuntimeObject(self, runtimeObjectName):
"""Given a runtimeObjectName, get the object.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]