dabo Commit
Revision 4576
Date: 2008-10-22 10:23:04 -0700 (Wed, 22 Oct 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4576
Changed:
U trunk/dabo/ui/uiwx/dSizerMixin.py
Log:
Finally addressed the problem with the dynamic doc_additions in dSizerMixin WRT
py2exe-generated apps. The problem was that when we compile the .py to .pyo,
__doc__ is None, so we can't append a string to that.
Diff:
Modified: trunk/dabo/ui/uiwx/dSizerMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dSizerMixin.py 2008-10-22 01:38:26 UTC (rev 4575)
+++ trunk/dabo/ui/uiwx/dSizerMixin.py 2008-10-22 17:23:04 UTC (rev 4576)
@@ -79,7 +79,11 @@
for item in items:
ret.append(self.append(item, *args, **kwargs))
return ret
- appendItems.__doc__ += _doc_additions
+ try:
+ appendItems.__doc__ += _doc_additions
+ except TypeError:
+ # If compressed to .pyo, __doc__ will be None.
+ pass
def append(self, obj, layout="normal", proportion=0, alignment=None,
halign="left", valign="top", border=None,
borderSides=None):
@@ -87,7 +91,11 @@
return self.insert(len(self.Children), obj, layout=layout,
proportion=proportion,
alignment=alignment, halign=halign,
valign=valign, border=border,
borderSides=borderSides)
- append.__doc__ += _doc_additions
+ try:
+ append.__doc__ += _doc_additions
+ except TypeError:
+ # If compressed to .pyo, __doc__ will be None.
+ pass
def append1x(self, obj, **kwargs):
"""Shorthand for sizer.append(obj, 1, "expand"). """
@@ -125,7 +133,11 @@
if ret.IsSizer():
obj._parent = self._parent
return ret
- insert.__doc__ += _doc_additions
+ try:
+ insert.__doc__ += _doc_additions
+ except TypeError:
+ # If compressed to .pyo, __doc__ will be None.
+ pass
def layout(self):
"""Layout the items in the sizer.
@@ -150,7 +162,11 @@
return self.insert(0, obj, layout=layout, proportion=proportion,
alignment=alignment, halign=halign,
valign=valign, border=border,
borderSides=None)
- prepend.__doc__ += _doc_additions
+ try:
+ prepend.__doc__ += _doc_additions
+ except TypeError:
+ # If compressed to .pyo, __doc__ will be None.
+ pass
def remove(self, item, destroy=None):
"""This will remove the item from the sizer. It will not cause
_______________________________________________
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]