main logo
Subject: [dabo-dev] dabo Commit 766
Author: Ed Leafe
Posted: 2005/01/31 14:26:54
 
View Entire Thread
New Search


dabo Commit
Revision 766
Date: 2005-01-31 11:26:39 -0800 (Mon, 31 Jan 2005)
Author: ed

Log:
Fixed missing 'self' references in dMenuBar.

Added a list of controls named 'daboDesignerControls' for the Designer to know what is available to add.

Added messagebox notification of failed delete, cancel and requery in dForm.


Changed:
U trunk/ui/uiwx/__init__.py
U trunk/ui/uiwx/dForm.py
U trunk/ui/uiwx/dMenuBar.py

Diff:
Modified: trunk/ui/uiwx/__init__.py
===================================================================
--- trunk/ui/uiwx/__init__.py 2005-01-31 05:30:41 UTC (rev 765)
+++ trunk/ui/uiwx/__init__.py 2005-01-31 19:26:39 UTC (rev 766)
@@ -101,6 +101,15 @@
__classDict["doc"] = __classRef.__doc__
daboDesignerClasses.append(__classDict)

+daboDesignerControls = []
+for __classRef in __dControlClasses:
+ __classDict = {}
+ __classDict["class"] = __classRef
+ __classDict["name"] = __classRef.__name__
+ __classDict["prompt"] = "%s&%s" % (__classRef.__name__[0], __classRef.__name__[1:])
+ __classDict["doc"] = __classRef.__doc__
+ daboDesignerControls.append(__classDict)
+
propsToShowInDesigner = ("Alignment", "AskToSave", "AutoResize",
"AutoSize", "BackColor", "BaseClass", "BorderResizable", "BorderStyle",
"Bottom", "CancelButton", "Caption", "Centered", "Choices", "Class",

Modified: trunk/ui/uiwx/dForm.py
===================================================================
--- trunk/ui/uiwx/dForm.py 2005-01-31 05:30:41 UTC (rev 765)
+++ trunk/ui/uiwx/dForm.py 2005-01-31 19:26:39 UTC (rev 766)
@@ -294,8 +294,7 @@
self.refreshControls()
except dException.dException, e:
dabo.errorLog.write(_("Cancel failed with response: %s") % str(e))
- ### TODO: What should be done here? Raise an exception?
- ### Prompt the user for a response?
+ dMessageBox.info(message=str(e), title=_("Cancel Not Allowed"))


def onRequery(self, evt):
@@ -356,8 +355,7 @@

except dException.dException, e:
dabo.errorLog.write(_("Requery failed with response: %s") % str(e))
- ### TODO: What should be done here? Raise an exception?
- ### Prompt the user for a response?
+ dMessageBox.stop(message=str(e), title=_("Requery Not Allowed"))
return ret

def delete(self, dataSource=None, message=None):
@@ -386,8 +384,7 @@
self.raiseEvent(dEvents.RowNumChanged)
except dException.dException, e:
dabo.errorLog.write(_("Delete failed with response: %s") % str(e))
- ### TODO: What should be done here? Raise an exception?
- ### Prompt the user for a response?
+ dMessageBox.stop(message=str(e), title=_("Deletion Not Allowed"))


def deleteAll(self, dataSource=None, message=None):
@@ -411,8 +408,7 @@
self.raiseEvent(dEvents.RowNumChanged)
except dException.dException, e:
dabo.errorLog.write(_("Delete All failed with response: %s") % str(e))
- ### TODO: What should be done here? Raise an exception?
- ### Prompt the user for a response?
+ dMessageBox.stop(message=str(e), title=_("Deletion Not Allowed"))


def new(self, dataSource=None):

Modified: trunk/ui/uiwx/dMenuBar.py
===================================================================
--- trunk/ui/uiwx/dMenuBar.py 2005-01-31 05:30:41 UTC (rev 765)
+++ trunk/ui/uiwx/dMenuBar.py 2005-01-31 19:26:39 UTC (rev 766)
@@ -2,6 +2,7 @@
import wx
import dabo
import dPemMixin as pm
+import dMenu
from dabo.dLocalize import _
import dabo.dEvents as dEvents

@@ -58,19 +59,19 @@

def append(self, caption):
"""Appends a dMenu to the end of the dMenuBar."""
- menu = _getMenu(caption)
+ menu = self._getMenu(caption)
self.appendMenu(menu)
return menu

def insert(self, pos, caption):
"""Inserts a dMenu at the specified position in the dMenuBar."""
- menu = _getMenu(caption)
+ menu = self._getMenu(caption)
self.insertMenu(pos, menu)
return menu

def prepend(self, caption):
"""Prepends a dMenu to the beginning of the dMenuBar."""
- menu = _getMenu(caption)
+ menu = self._getMenu(caption)
self.prependMenu(menu)
return menu





 
©2005 Ed Leafe
<-- Prior Message New Search Next Message -->