If you execute, say: python dTextBox.py The dTextBox.py's main section will instantiate class Test and do a simple unit test of dTextBox. If you instead run this test.py as a script, a form will be instantiated with all the dControls. """ import dabo import dabo.ui as ui from dabo.dApp import dApp import dabo.dEvents as dEvents ui.loadUI("tk") class Test(object): def __init__(self): self.app = dApp() self.app.LogEvents = ["All"] def runTest(self, classRef): self.app.setup() frame = self.app.MainForm object = classRef(frame) object.debug = True self.app.start() def testAll(self): """ Create a dForm and populate it with example dWidgets.
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import copy import dabo import dabo.ui as dui import dabo.dEvents as dEvents import dabo.dConstants as k from dabo.dApp import dApp from dabo.dLocalize import _ from dabo.lib.utils import ustr from dabo.lib.connParser import createXML from dabo.lib.connParser import importConnections import dabo.lib.utils as utils dui.loadUI("wx") from HomeDirectoryStatusBar import HomeDirectoryStatusBar def flushValues(fnc): def _wrapped(self, *args, **kwargs): self.updtFromForm() return fnc(self, *args, **kwargs) return _wrapped class EditorForm(dui.dForm): def afterSetMenuBar(self): self.createMenu()
If you execute, say: python dTextBox.py The dTextBox.py's main section will instantiate class Test and do a simple unit test of dTextBox. If you instead run this test.py as a script, a form will be instantiated with all the dControls. """ import dabo import dabo.ui as ui from dabo.dApp import dApp import dabo.dEvents as dEvents ui.loadUI("tk") class Test(object): def __init__(self): self.app = dApp() self.app.LogEvents = ["All"] def runTest(self, classRef): self.app.setup() frame = self.app.MainForm object = classRef(frame) object.debug = True self.app.start() def testAll(self):