dabo Commit
Revision 6320
Date: 2011-01-15 13:37:30 -0800 (Sat, 15 Jan 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6320
Changed:
U trunk/dabo/dObject.py
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Fixed an issue reported by Sibylle Koczian in which grid column attributes were
not being properly initialized.
Diff:
Modified: trunk/dabo/dObject.py
===================================================================
--- trunk/dabo/dObject.py 2011-01-15 18:44:11 UTC (rev 6319)
+++ trunk/dabo/dObject.py 2011-01-15 21:37:30 UTC (rev 6320)
@@ -10,6 +10,10 @@
from dabo.dPref import dPref
from dabo.dLocalize import _
+NONE_TYPE = type(None)
+
+
+
class Dummy(object):
# Much thanks to Robin Dunn for a workaround to a nasty problem that
reared
# its head starting with wxPython 2.7, when we had to switch around the
order
@@ -19,6 +23,8 @@
# fixes the issue, which was ultimately caused by autosuper's __slots__.
pass
+
+
class dObject(Dummy, autosuper, DoDefaultMixin, PropertyHelperMixin,
EventMixin):
""" The basic ancestor of all dabo objects."""
@@ -33,6 +39,7 @@
# the call to setProperties() at the end!
_call_beforeInit, _call_afterInit, _call_initProperties = True, True,
True
+
def __init__(self, properties=None, attProperties=None, *args,
**kwargs):
if not hasattr(self, "_properties"):
self._properties = {}
@@ -62,6 +69,8 @@
if not issubclass(typ, basestring):
if issubclass(typ, bool):
val = (val == "True")
+ elif typ is NONE_TYPE:
+ val = None
else:
try:
val = typ(val)
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2011-01-15 18:44:11 UTC (rev 6319)
+++ trunk/dabo/ui/uiwx/dGrid.py 2011-01-15 21:37:30 UTC (rev 6320)
@@ -446,6 +446,12 @@
self._customRenderers = {}
self._customEditors = {}
+ #Declare Internal Header Attributes
+ self._headerVerticalAlignment = "Center"
+ self._headerHorizontalAlignment = "Center"
+ self._headerForeColor = None
+ self._headerBackColor = None
+
self._beforeInit()
kwargs["Parent"] = parent
# dColumn maintains one attr object that the grid table will
use for
_______________________________________________
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]