I'm sorry but i haven't understood a particular. In my dForm i use the dbConnection for instatiating the bizObj. See here http://pastebin.com/m36f0228a in add_business method.
If i use your way to load the form the form gets loaded but in the add_business the dbConnection isn't found because it is not yet initialized. I see that the db connections gets initialized in app.setup during _initDB but i have to set MainFormClass *before* app.setup. So i don't know how to manage to resolve these dependancies .. Thanks, Emanuele On Sun, Oct 4, 2009 at 8:04 PM, Ed Leafe <[email protected]> wrote: > On Oct 4, 2009, at 12:37 PM, Emanuele Gesuato wrote: > >> If i do as you write it works but i want do enable dbConnection when >> it start. > > If the cnxml file is in the db directory, it will be read in. If your > form's bizobj uses that connection, it will automatically be opened. > >> So i tried doing: >> app.setup() >> app.dbConnection = app.getConnectionByName('Connection_1') >> app.MainFormClass = app.ui.ListinoArticoli >> app.start() >> >> but in this way i got an empty form. Why ? > > > Because you set MainFormClass *after* the app had already been > launched (that's what setup() does; start() merely starts the UI event > loop). The recommended way is to pass the MainFormClass in the app > constructor: > > app = dabo.dApp(MainFormClass=ui.ListinoAtricoli) > > > -- Ed Leafe > > > > > [excessive quoting removed by server] _______________________________________________ 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]
