Changeset 2888
- Timestamp:
- 03/07/07 09:35:34 (1 year ago)
- Files:
-
- branches/uwe/dabo/biz/dBizobj.py (modified) (5 diffs)
- branches/uwe/dabo/dColors.py (modified) (7 diffs)
- branches/uwe/dabo/dObject.py (modified) (5 diffs)
- branches/uwe/dabo/lib/DesignerXmlConverter.py (modified) (1 diff)
- branches/uwe/dabo/ui/dialogs/htmlAbout.py (modified) (1 diff)
- branches/uwe/dabo/ui/uiwx/__init__.py (modified) (4 diffs)
- branches/uwe/dabo/ui/uiwx/dImage.py (modified) (5 diffs)
- branches/uwe/dabo/ui/uiwx/dImageMixin.py (modified) (1 diff)
- branches/uwe/dabo/ui/uiwx/dListBox.py (modified) (1 diff)
- branches/uwe/dabo/ui/uiwx/dListControl.py (modified) (3 diffs)
- branches/uwe/dabo/ui/uiwx/dPanel.py (modified) (3 diffs)
- branches/uwe/dabo/ui/uiwx/dSplitter.py (modified) (6 diffs)
- branches/uwe/dabo/ui/uiwx/dTreeView.py (modified) (3 diffs)
- branches/uwe/dabo/ui/uiwx/uiApp.py (modified) (1 diff)
- branches/uwe/tests (copied) (copied from trunk/tests)
- branches/uwe/tests/ModuleInitTemplate.py (copied) (copied from trunk/tests/ModuleInitTemplate.py)
- branches/uwe/tests/TestCaseTemplate.py (copied) (copied from trunk/tests/TestCaseTemplate.py)
- branches/uwe/tests/unitTests (copied) (copied from trunk/tests/unitTests)
- branches/uwe/tests/unitTests/Test_dColors.py (copied) (copied from trunk/tests/unitTests/Test_dColors.py)
- branches/uwe/tests/unitTests/Test_dObject.py (copied) (copied from trunk/tests/unitTests/Test_dObject.py)
- branches/uwe/tests/unitTests/biz (copied) (copied from trunk/tests/unitTests/biz)
- branches/uwe/tests/unitTests/biz/__init__.py (copied) (copied from trunk/tests/unitTests/biz/__init__.py)
- branches/uwe/tests/unitTests/db (copied) (copied from trunk/tests/unitTests/db)
- branches/uwe/tests/unitTests/db/__init__.py (copied) (copied from trunk/tests/unitTests/db/__init__.py)
- branches/uwe/tests/unitTests/lib (copied) (copied from trunk/tests/unitTests/lib)
- branches/uwe/tests/unitTests/lib/__init__.py (copied) (copied from trunk/tests/unitTests/lib/__init__.py)
- branches/uwe/tests/unitTests/masterTestSuite.py (copied) (copied from trunk/tests/unitTests/masterTestSuite.py)
- branches/uwe/tests/unitTests/ui (copied) (copied from trunk/tests/unitTests/ui)
- branches/uwe/tests/unitTests/ui/UIwx (copied) (copied from trunk/tests/unitTests/ui/UIwx)
- branches/uwe/tests/unitTests/ui/UIwx/__init__.py (copied) (copied from trunk/tests/unitTests/ui/UIwx/__init__.py)
- branches/uwe/tests/unitTests/ui/__init__.py (copied) (copied from trunk/tests/unitTests/ui/__init__.py)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/uwe/dabo/biz/dBizobj.py
r2856 r2888 393 393 394 394 self.afterCancel() 395 396 397 def deleteAllChildren(self, startTransaction=False): 398 """Delete all children associated with the current record without 399 deleting the current record in this bizobj. 400 """ 401 cursor = self._CurrentCursor 402 errMsg = self.beforeDeleteAllChildren() 403 if errMsg: 404 raise dException.BusinessRuleViolation, errMsg 405 406 if startTransaction: 407 cursor.beginTransaction() 408 409 try: 410 for child in self.__children: 411 child.deleteAll(startTransaction=False) 412 if startTransaction: 413 cursor.commitTransaction() 414 self.afterDeleteAllChildren() 415 416 except dException.DBQueryException, e: 417 if startTransaction: 418 cursor.rollbackTransaction() 419 raise dException.DBQueryException, e 420 except StandardError, e: 421 if startTransaction: 422 cursor.rollbackTransaction() 423 raise StandardError, e 395 424 396 425 … … 444 473 if startTransaction: 445 474 cursor.rollbackTransaction() 446 else: 447 raise dException.DBQueryException, e 475 raise dException.DBQueryException, e 448 476 except StandardError, e: 449 cursor.rollbackTransaction() 477 if startTransaction: 478 cursor.rollbackTransaction() 450 479 raise StandardError, e 451 480 … … 1291 1320 def prepareWhere(self, clause): 1292 1321 return self._CurrentCursor.prepareWhere(clause) 1293 1322 def getFieldClause(self): 1323 return self._CurrentCursor.getFieldClause() 1324 def getFromClause(self): 1325 return self._CurrentCursor.getFromClause() 1326 def getJoinClause(self): 1327 return self._CurrentCursor.getJoinClause() 1328 def getWhereClause(self): 1329 return self._CurrentCursor.getWhereClause() 1330 def getGroupByClause(self): 1331 return self._CurrentCursor.getGroupByClause() 1332 def getOrderByClause(self): 1333 return self._CurrentCursor.getOrderByClause() 1334 ########## END - SQL Builder interface section ############## 1294 1335 1295 1336 … … 1299 1340 def beforeNew(self): return "" 1300 1341 def beforeDelete(self): return "" 1342 def beforeDeleteAllChildren(self): return "" 1301 1343 def beforeFirst(self): return "" 1302 1344 def beforePrior(self): return "" … … 1313 1355 def afterNew(self): pass 1314 1356 def afterDelete(self): pass 1357 def afterDeleteAllChildren(self): return "" 1315 1358 def afterFirst(self): pass 1316 1359 def afterPrior(self): pass branches/uwe/dabo/dColors.py
r2497 r2888 1 import re 1 import re, types 2 3 class HexError(Exception): pass 4 class InvalidCharError(HexError): pass 5 class TypeError(HexError): pass 6 7 class ColorTupleError(Exception): pass 8 class RgbValueError(ColorTupleError): pass 9 class LengthError(ColorTupleError): pass 10 class IntegerTypeError(ColorTupleError): pass 2 11 3 12 colorDict = {"aliceblue" : (240, 248, 255), … … 156 165 157 166 def hexToDec(hx): 167 if not isinstance(hx, types.StringTypes): 168 raise TypeError, "Input must be a string" 158 169 # Define a dict of char-value pairs 159 170 hex = {"0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, … … 164 175 pos = 1 165 176 for c in rev: 177 if hex.get(c) == None: 178 raise InvalidCharError, "%s is an invalid hex character" % (c, ) 166 179 ret += (hex[c] * pos) 167 180 pos = pos * 16 … … 171 184 def tupleToHex(t, includeHash=True): 172 185 """Convert a color tuple into an HTML hex format.""" 186 if not len(t) == 3: 187 raise LengthError, "Color tuple needs to contain 3 elements" 188 for rgb in t: 189 if not isinstance(rgb, types.IntType): 190 raise IntegerTypeError, "Tuple elements should be all integers." 191 if not 0 <= rgb <= 255: 192 raise RgbValueError, "Rgb Value must be in the range 0-255" 173 193 rx, gx, bx = hex(t[0]), hex(t[1]), hex(t[2]) 174 194 # Each is in the format '0x00'. … … 176 196 g = gx[2:].upper() 177 197 b= bx[2:].upper() 198 if len(r) == 1: r = '0' + r 199 if len(g) == 1: g = '0' + g 200 if len(b) == 1: b = '0' + b 178 201 ret = "" 179 202 if includeHash: … … 186 209 # Strip the pound sign, if any 187 210 hx = hx.replace("#", "") 211 hx = hx.lstrip('0') 212 if len(hx) < 6: hx = '0'*(6-len(hx)) + hx 188 213 red = hexToDec(hx[:2]) 189 214 green = hexToDec(hx[2:4]) … … 217 242 grps = mtch.groups() 218 243 ret = (int(grps[0]), int(grps[1]), int(grps[2])) 244 for val in ret: 245 if not 0 <= val <= 255: 246 raise KeyError, "Color tuple integer must range from 0-255" 219 247 else: 220 248 raise KeyError, "Color '%s' is not defined." % color branches/uwe/dabo/dObject.py
r2482 r2888 221 221 222 222 def _setBasePrefKey(self, val): 223 if not isinstance(val, types.StringTypes): 224 raise TypeError, 'BasePrefKey must be a string.' 223 225 self._basePrefKey = val 224 226 pm = self.PreferenceManager … … 229 231 230 232 def _getClass(self): 231 try: 232 return self.__class__ 233 except AttributeError: 234 return None 233 return self.__class__ 235 234 236 235 … … 267 266 return "?" 268 267 269 def _setName(self, value): 270 self._name = str(value) 268 def _setName(self, val): 269 if not isinstance(val, types.StringTypes): 270 raise TypeError, 'Name must be a string.' 271 if not len(val.split()) == 1: 272 raise KeyError, 'Name must not contain any spaces' 273 self._name = val 271 274 272 275 … … 293 296 294 297 def _setPreferenceManager(self, val): 298 if not isinstance(val, dPref): 299 raise TypeError, 'PreferenceManager must be a dPref object' 295 300 self._preferenceManager = val 296 297 298 def _getSuperClass(self):299 if self.BaseClass == self.Class:300 # The superclass is lower down than Dabo, and useless to the user.301 return None302 else:303 return self.__class__.__base__304 301 305 302 … … 335 332 _("Reference to the Preference Management object (dPref)")) 336 333 337 SuperClass = property(_getSuperClass, None, None,338 _("The super class of the object. Read-only. (class)"))339 340 334 341 335 if __name__ == "__main__": branches/uwe/dabo/lib/DesignerXmlConverter.py
r2843 r2888 267 267 isBorderSizer = clsname == "LayoutBorderSizer" 268 268 ornt = "" 269 prnt = "" 269 270 if not isGridSizer: 270 propString = "Orientation='%s'" % self._extractKey(atts, "Orientation", "H")271 prnt = ""272 if isBorderSizer:273 prnt = "currParent, "274 propString = "'%s', Caption=\"%s\"" % (self._extractKey(atts, "Orientation", "H"),275 self._extractKey(atts, "Caption", ""))271 if isBorderSizer: 272 prnt = "currParent, " 273 propString = "'%s', Caption=\"%s\"" % (self._extractKey(atts, "Orientation", "H"), 274 self._extractKey(atts, "Caption", "")) 275 else: 276 propString = "Orientation='%s'" % self._extractKey(atts, "Orientation", "H") 276 277 if self.CreateDesignerControls: 277 278 superName = clsname branches/uwe/dabo/ui/dialogs/htmlAbout.py
r2600 r2888 100 100 def onCopyInfo(self, evt): 101 101 """Copy the system information to the Clipboard""" 102 self.Application.copyToClipboard(self.getInfoString(useHTML=False)) 102 info = self.getInfoString(useHTML=False) 103 appdoc = self.getAppSpecificString() 104 self.Application.copyToClipboard("\n\n".join((info, appdoc))) 103 105 104 106 branches/uwe/dabo/ui/uiwx/__init__.py
r2841 r2888 593 593 594 594 595 def getString(message= "Please enter a string:", caption="Dabo", defaultValue=""):595 def getString(message=_("Please enter a string:"), caption="Dabo", defaultValue=""): 596 596 """Simple dialog for returning a small bit of text from the user.""" 597 597 dlg = wx.TextEntryDialog(_getActiveForm(), message, caption, defaultValue) … … 605 605 606 606 607 def getInt(message= "Enter an integer value:", caption="Dabo",defaultValue=0):607 def getInt(message=_("Enter an integer value:"), caption="Dabo", defaultValue=0): 608 608 """Simple dialog for returning an integer value from the user.""" 609 609 class IntDialog(dabo.ui.dOkCancelDialog): … … 626 626 dlg.Destroy() 627 627 return val 628 629 630 # The next two methods prompt the user to select from a list. The first allows 631 # a single selection, while the second allows for multiple selections. 632 def getChoice(choices, message=None, caption=None, defaultPos=None): 633 """Simple dialog for presenting the user with a list of choices from which 634 they can select one item. 635 """ 636 return _getChoiceDialog(choices, message, caption, defaultPos, False) 637 638 639 def getChoices(choices, message=None, caption=None, defaultPos=None): 640 """Simple dialog for presenting the user with a list of choices from which 641 they can select one or more items. Returns a tuple containing the selections. 642 """ 643 return _getChoiceDialog(choices, message, caption, defaultPos, True) 644 645 646 def _getChoiceDialog(choices, message, caption, defaultPos, mult): 647 if message is None: 648 message = _("Please make your selection:") 649 if caption is None: 650 caption = "Dabo" 651 if defaultPos is None: 652 defaultPos = 0 653 if mult is None: 654 mult = False 655 class ChoiceDialog(dabo.ui.dOkCancelDialog): 656 def addControls(self): 657 self.Caption = caption 658 lbl = dabo.ui.dLabel(self, Caption=message) 659 self.lst = dabo.ui.dListBox(self, Choices=choices, 660 PositionValue=defaultPos, MultipleSelect=mult, 661 OnMouseLeftDoubleClick=self.onOK) 662 sz = self.Sizer 663 sz.appendSpacer(25) 664 sz.append(lbl, halign="center") 665 sz.appendSpacer(5) 666 sz.append(self.lst, 4, halign="center") 667 if mult: 668 hsz = dabo.ui.dSizer("h") 669 btnAll = dabo.ui.dButton(self, Caption=_("Select All"), 670 OnHit=self.selectAll) 671 btnNone = dabo.ui.dButton(self, Caption=_("Unselect All"), 672 OnHit=self.unselectAll) 673 hsz.append(btnAll) 674 hsz.appendSpacer(8) 675 hsz.append(btnNone) 676 sz.appendSpacer(16) 677 sz.append(hsz, halign="center", border=20) 678 sz.appendSpacer(8) 679 sz.append(dabo.ui.dLine(self), "x", border=44, 680 borderSides=("left", "right")) 681 sz.appendSpacer(24) 682 683 def selectAll(self, evt): 684 self.lst.selectAll() 685 686 def unselectAll(self, evt): 687 self.lst.invertSelections() 688 689 690 dlg = ChoiceDialog(_getActiveForm()) 691 dlg.show() 692 if dlg.Accepted: 693 val = dlg.lst.StringValue 694 else: 695 val = None 696 dlg.release() 697 return val 628 698 629 699 … … 781 851 782 852 783 def getFolder(message= "Choose a folder", defaultPath="", wildcard="*"):853 def getFolder(message=_("Choose a folder"), defaultPath="", wildcard="*"): 784 854 """Displays the folder selection dialog for the platform. 785 855 Returns the path to the selected folder, or None if no selection branches/uwe/dabo/ui/uiwx/dImage.py
r2833 r2888 102 102 # No image to display 103 103 self.Bitmap = wx.EmptyBitmap(1, 1) 104 self.Freeze() 104 105 self.SetBitmap(self.Bitmap) 106 self.Thaw() 105 107 return 106 108 … … 159 161 self._bitmapWidth = self.Bitmap.GetWidth() 160 162 163 self.Freeze() 161 164 try: 162 165 self.SetBitmap(self.Bitmap) 163 166 except TypeError, e: pass 167 self.Thaw() 164 168 self._inShowPic = True 165 169 self.SetSize((origW, origH)) … … 289 293 def afterInit(self): 290 294 self.Caption = "dImage Demonstration" 295 self.mainPanel = mp = dabo.ui.dPanel(self) 296 self.Sizer.append1x(mp) 297 sz = dabo.ui.dSizer("v") 298 mp.Sizer = sz 291 299 # Create a panel with horiz. and vert. sliders 292 self.imgPanel = dabo.ui.dPanel( self)293 self.VSlider = dabo.ui.dSlider( self, Orientation="V", Min=1, Max=100,300 self.imgPanel = dabo.ui.dPanel(mp) 301 self.VSlider = dabo.ui.dSlider(mp, Orientation="V", Min=1, Max=100, 294 302 Value=100, OnHit=self.onSlider) 295 self.HSlider = dabo.ui.dSlider( self, Orientation="H", Min=1, Max=100,303 self.HSlider = dabo.ui.dSlider(mp, Orientation="H", Min=1, Max=100, 296 304 Value=100, OnHit=self.onSlider) 297 305 … … 301 309 hsz.appendSpacer(10) 302 310 hsz.append(self.VSlider, 0, "x") 303 s elf.Sizer.DefaultBorder = 25304 s elf.Sizer.DefaultBorderLeft = self.Sizer.DefaultBorderRight = True305 s elf.Sizer.appendSpacer(25)306 s elf.Sizer.append(hsz, 1, "x")307 s elf.Sizer.appendSpacer(10)308 s elf.Sizer.append(self.HSlider, 0, "x")309 s elf.Sizer.appendSpacer(10)311 sz.DefaultBorder = 25 312 sz.DefaultBorderLeft = sz.DefaultBorderRight = True 313 sz.appendSpacer(25) 314 sz.append(hsz, 1, "x") 315 sz.appendSpacer(10) 316 sz.append(self.HSlider, 0, "x") 317 sz.appendSpacer(10) 310 318 311 319 # Create the image control … … 314 322 hsz = dabo.ui.dSizer("H") 315 323 hsz.DefaultSpacing = 10 316 dabo.ui.dBitmapButton( self, RegID="btnRotateCW",324 dabo.ui.dBitmapButton(mp, RegID="btnRotateCW", 317 325 Picture="rotateCW", OnHit=self.rotateCW) 318 dabo.ui.dBitmapButton( self, RegID="btnRotateCCW",326 dabo.ui.dBitmapButton(mp, RegID="btnRotateCCW", 319 327 Picture="rotateCCW", OnHit=self.rotateCCW) 320 328 hsz.append(self.btnRotateCW) 321 329 hsz.append(self.btnRotateCCW) 322 self.ddScale = dabo.ui.dDropdownList( self,330 self.ddScale = dabo.ui.dDropdownList(mp, 323 331 Choices=["Proportional", "Stretch", "Clip"], 324 332 DataSource = "self.Form.img", 325 333 DataField = "ScaleMode") 326 334 self.ddScale.PositionValue = 0 327 btn = dabo.ui.dButton( self, Caption="Load Image",335 btn = dabo.ui.dButton(mp, Caption="Load Image", 328 336 OnHit=self.onLoadImage) 329 btnOK = dabo.ui.dButton( self, Caption="Done", OnHit=self.close)337 btnOK = dabo.ui.dButton(mp, Caption="Done", OnHit=self.close) 330 338 hsz.append(self.ddScale, 0, "x") 331 339 hsz.append(btn, 0, "x") 332 340 hsz.append(btnOK, 0, "x") 333 s elf.Sizer.append(hsz, 0, alignment="right")334 s elf.Sizer.appendSpacer(25)341 sz.append(hsz, 0, alignment="right") 342 sz.appendSpacer(25) 335 343 336 344 # Set the idle update flage branches/uwe/dabo/ui/uiwx/dImageMixin.py
r2386 r2888 91 91 else: 92 92 bmp = dabo.ui.strToBmp(val, self._imgScale, self._imgWd, self._imgHt) 93 self.Freeze() 93 94 self.SetBitmap(bmp) 95 self.Thaw() 94 96 else: 95 97 self._properties["Picture"] = val branches/uwe/dabo/ui/uiwx/dListBox.py
r2788 r2888 28 28 for elem in self.GetSelections(): 29 29 self.SetSelection(elem, False) 30 31 32 def selectAll(self): 33 if self.MultipleSelect: 34 for ii in xrange(self.Count): 35 self.SetSelection(ii) 36 37 38 def unselectAll(self): 39 self.clearSelections() 30 40 31 41 42 def invertSelections(self): 43 """Switch all the items from False to True, and vice-versa.""" 44 for ii in xrange(self.Count): 45 if self.IsSelected(ii): 46 self.Deselect(ii) 47 else: 48 self.SetSelection(ii) 49 50 32 51 def _getMultipleSelect(self): 33 52 return self._hasWindowStyleFlag(wx.LB_EXTENDED) branches/uwe/dabo/ui/uiwx/dListControl.py
r2788 r2888 62 62 63 63 64 def removeColumn(self, pos=None): 65 """Removes the specified column, or the last column if 66 no column number is passed. 67 """ 68 if pos is None: 69 pos = self.GetColumnCount() -1 70 self.DeleteColumn(pos) 71 72 64 73 def setColumns(self, colList): 65 74 """ Accepts a list/tuple of column headings, removes any … … 346 355 347 356 348 def _getCol Count(self):357 def _getColumnCount(self): 349 358 return self.GetColumnCount() 359 360 def _setColumnCount(self, val): 361 if self._constructed(): 362 cc = self.GetColumnCount() 363 if val < cc: 364 # Remove rightmost columns 365 while val < self.GetColumnCount(): 366 self.removeColumn() 367 elif val > cc: 368 while val > self.GetColumnCount(): 369 self.addColumn(_("Column %s") % self.GetColumnCount()) 370 else: 371 self._properties["ColumnCount"] = val 350 372 351 373 … … 452 474 453 475 454 ColumnCount = property(_getCol Count, None, None,455 _("Number of columns in the control (read-only). (int)"))476 ColumnCount = property(_getColumnCount, _setColumnCount, None, 477 _("Number of columns in the control (int)")) 456 478 457 479 Count = property(_getRowCount, None, None, branches/uwe/dabo/ui/uiwx/dPanel.py
r2788 r2888 13 13 def __init__(self, preClass, parent, properties=None, attProperties=None, 14 14 *args, **kwargs): 15 self._minSizerWidth = 10 16 self._minSizerHeight = 10 15 17 self._buffered = None 16 18 buff = self._extractKey(attProperties, "Buffered", None) … … 34 36 # Set the panel's minimum size back to zero. This is sometimes 35 37 # necessary when the items in the panel have reduced in size. 36 self.SetMinSize(( 0, 0))38 self.SetMinSize((self.MinSizerWidth, self.MinSizerHeight)) 37 39 self.Layout() 38 40 for child in self.Children: … … 96 98 97 99 100 def _getMinSizerHeight(self): 101 return self._minSizerHeight 102 103 def _setMinSizerHeight(self, val): 104 if self._constructed(): 105 self._minSizerHeight = val 106 else: 107 self._properties["MinSizerHeight"] = val 108 109 110 def _getMinSizerWidth(self): 111 return self._minSizerWidth 112 113 def _setMinSizerWidth(self, val): 114 if self._constructed(): 115 self._minSizerWidth = val 116 else: 117 self._properties["MinSizerWidth"] = val 118 119 98 120 Buffered = property(_getBuffered, _setBuffered, None, 99 121 _("Does this panel use double-buffering to create smooth redrawing? (bool)")) 100 122 123 MinSizerHeight = property(_getMinSizerHeight, _setMinSizerHeight, None, 124 _("Minimum height for the panel. Default=10px (int)")) 125 126 MinSizerWidth = property(_getMinSizerWidth, _setMinSizerWidth, None, 127 _("Minimum width for the panel. Default=10px (int)")) 128 129 101 130 102 131 branches/uwe/dabo/ui/uiwx/dSplitter.py
r2788 r2888 68 68 self.Sizer.append(win, 1, "expand") 69 69 self.splitter = win 70 self. Layout()70 self.layout() 71 71 72 72 … … 107 107 def __init__(self, parent, properties=None, attProperties=None, *args, **kwargs): 108 108 self._baseClass = dSplitter 109 baseStyle = wx.SP_3D | wx.SP_ PERMIT_UNSPLIT109 baseStyle = wx.SP_3D | wx.SP_LIVE_UPDATE | wx.SP_PERMIT_UNSPLIT 110 110 style = self._extractKey((kwargs, properties, attProperties), "style", baseStyle) 111 111 self._createPanes = self._extractKey(attProperties, "createPanes", None) … … 128 128 129 129 # Default to vertical split 130 self._orientation = "v"130 self._orientation = self._extractKey((kwargs, properties, attProperties), "Orientation", "v") 131 131 self._sashPos = 100 132 132 self._p1 = self._p2 = None … … 188 188 self.Initialize(pnl) 189 189 190 191 def layout(self): 192 self.Panel1.layout() 193 self.Panel2.layout() 194 190 195 191 196 def _onSashDClick(self, evt): … … 226 231 else: 227 232 self.SplitVertically(self.Panel1, self.Panel2, pos) 228 self. Layout()233 self.layout() 229 234 230 235 … … 234 239 self._getSashPosition() 235 240 self.Unsplit(win) 236 self. Layout()241 self.layout() 237 242 238 243 branches/uwe/dabo/ui/uiwx/dTreeView.py
r2824 r2888 451 451 """ 452 452 self.lockDisplay() 453 ndExp = [(nd, nd.Expanded) for nd in self.nodes] 453 ndExp = [(nd, nd.Expanded) for nd in self.nodes 454 455 if ((not nd.IsRootNode) or self.ShowRootNode)] 454 456 self.collapseAll() 455 457 for nd, exp in ndExp: … … 460 462 def getRootNode(self): 461 463 return self._rootNode 462 464 463 465 464 466 def setRootNode(self, txt): … … 1257 1259 1258 1260 1259 1260 1261 app = dabo.dApp() 1261 1262 app.MainFormClass = TreeViewTestForm branches/uwe/dabo/ui/uiwx/uiApp.py
r2856 r2888 312 312 orphan.close() 313 313 # Now close the main form. It will close any of its children. 314 self.dApp.MainForm.close() 314 mf = self.dApp.MainForm 315 if not mf._finito: 316 mf.close() 315 317 else: 316 318 while frms:
