main logo
Subject: [dabo-dev] dabo Commit 428
Author: noreply (AT) paulmcnett D.O.T com
Posted: 2004/08/31 23:14:30
 
View Entire Thread
New Search


dabo Commit
Revision 428
Date: 2004-08-31 21:14:30 -0700 (Tue, 31 Aug 2004)
Author: paul

Log:
Removed another chunk of code relating to the addControl removal.

Made dControlMixin and dControlMixin ui-agnostic, and my next commit will move them out
of uiwx and into ui.


Changed:
U trunk/ui/uiwx/dControlMixin.py
U trunk/ui/uiwx/dDataControlMixin.py

Diff:
Modified: trunk/ui/uiwx/dControlMixin.py
===================================================================
--- trunk/ui/uiwx/dControlMixin.py 2004-09-01 03:53:34 UTC (rev 427)
+++ trunk/ui/uiwx/dControlMixin.py 2004-09-01 04:14:30 UTC (rev 428)
@@ -15,7 +15,6 @@

dControlMixin.doDefault()

- self.addToDform()

def initEvents(self):
dControlMixin.doDefault()
@@ -34,13 +33,3 @@
if self.debug:
dabo.infoLog.write(_("%s: onHit() called.") % self.Name)

- def addToDform(self):
- """ Ask the dForm to add this control to its registry.
- """
- try:
- self.Form.addControl(self)
- except AttributeError:
- # perhaps the form isn't a dForm
- pass
-
-

Modified: trunk/ui/uiwx/dDataControlMixin.py
===================================================================
--- trunk/ui/uiwx/dDataControlMixin.py 2004-09-01 03:53:34 UTC (rev 427)
+++ trunk/ui/uiwx/dDataControlMixin.py 2004-09-01 04:14:30 UTC (rev 428)
@@ -1,8 +1,7 @@
""" dDataControlMixin.py: Provide behavior common to all
data-aware dControls.
"""
-import wx
-import dabo
+import dabo, dabo.ui
import dControlMixin
import dabo.dEvents as dEvents
import dabo.dException as dException
@@ -38,12 +37,14 @@
def getBlankValue(self):
""" Return the empty value of the control.
"""
- if isinstance(self, wx.TextCtrl):
+ if isinstance(self, dabo.ui.dTextBox, dabo.ui.dEditBox):
return ""
- elif isinstance(self, wx.CheckBox):
+ elif isinstance(self, dabo.ui.dCheckBox):
return False
- elif isinstance(self, wx.SpinCtrl):
+ elif isinstance(self, dabo.ui.dSpinner):
return 0
+ else:
+ return None


def getFieldVal(self):



 
©2004 noreply (at) paulmcnett .D.OT com
<-- Prior Message New Search Next Message -->