From Dabo Wiki
Revision as of 14:08, 17 May 2020 by Ed (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You will get the full benefit of this document by first watching the screencasts "Using the Data Environment" parts 1 & 2.

First, create the bizobjs. I'm assuming that you've specified the KeyField and LinkField properties in the bizobj classes. If using the ClassDesigner, this would be located near the end of the createBizobjs() method of the Form.

bizParent = MyParentBizobjClass(conn)
bizChild = MyChildBizobjClass(conn)
bizGrandchild = MyGrandchildBizobjClass(conn)

Now add each to its parent:


Setting up an Parent-Child relationship, like a customer and his/her orders, is very easily done, as shown by Ed Leafe in the screencast, but what if you want to be able to not only choose a customer and order, but also view/edit the particular items in that order? I'll start by giving you some helpful hints and fill in more information, screenshots, etc, at a later date.

In the screencast, Ed adds the code to the onHit() method of his Next button for advancing to the next customer. If you build a similar interface for the orders, with navigation buttons and text fields, you cannot use a plain because it will advance to the next customer rather than the next order. You need to explicitly tell it the order's datasource:

def onHit(self):'orders')

More hints to come...