On 3/24/11 10:57 AM, John Fabiani wrote:
> What's required to create a non-GUI and still use the bizobjs etc.. An example
> would be nice.
Set UI=None to the dApp() call.
IOW:
{{{
import dabo
app = dabo.dApp(UI=None)
app.setup()
con = dabo.db.connect(":memory:")
cur = con.cursor()
cur.execute("create table test (id int, firstname char)")
cur.execute("insert into test (id, firstname) values (23, 'Paul')")
cur.execute("insert into test (id, firstname) values (42, 'John')")
cur.UserSQL = "select id, firstname from test"
cur.requery()
print "Testing db:", cur.getDataSet()
class BizTest(dabo.biz.dBizobj):
def initProperties(self):
self.DataSource = "test"
self.KeyField = "id"
bizTest = BizTest(con)
bizTest.requery()
print "testing biz:", bizTest.getDataSet()
# don't call app.start() without a UI
}}}
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]