On Sep 30, 2008, at 7:37 PM, Dave Rowe wrote:
> So, is there not a way to tie the inputs on the WizardPage to the
> BizObj,
> such that it binds, and saves a new record upon clicking 'Next' or
> 'Finish'? Would the best practice (if still using the Wizard) to
> manually
> build the INSERT statement? I'm not opposed to it, necessarily,
> just want
> to make sure I'm not violating a design rule in Dabo or something :)
The data binding code was originally written only in the dForm class,
with the hope that we would be able to display that class in either a
modal or modeless state. Turned out the wxPython doesn't support modal
display of their wxFrame class. There has been discussion of
refactoring out the bizobj/data handling code from the dForm and
mixing it into both dForm and dDialog, but that's a HUGE undertaking
that would potentially break every existing app. So far we simply
haven't had the time to do that.
Dabo is built on a three-tier design: UI, business logic, and data
access. If you ever find yourself writing code in one layer that
handles the inner workings of another, you're probably doing it wrong.
You *can* add a bizobj to a wizard, but you'll have handle the
internal references, such as getBizobj() and PrimaryBizobj yourself.
You'll also have to make sure that the form's update() method is
called as needed to populate the bound controls with the current data
from the bizobj. It's not a prohibitive task; just be aware that there
may be quirks in your app if you forget to handle something. I'll be
happy to help you if you want to try.
-- Ed Leafe
_______________________________________________
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]