On Aug 14, 2013, at 9:59 AM, Ricardo Aráoz <[email protected]> wrote:
>> In my mind the form methods are there to be convenient for quick
>> development, and the
>> bizobj methods are closer to the metal and will have more options.
>
> But isn't that going against the three tier concept?
> I thought the idea was that the control (let's say a button) interacted with
> the form, then the form interacted with the biz and finally the biz with the
> db.
> Or am I getting it wrong.... again ;c)
You are correct, but you're missing some pieces.
The button should only handle the click - that's it. When it gets clicked, it
tells the form, and the form carries out whatever action is appropriate. In
your case, the button code would look like:
def onHit(self, evt):
self.Form.doSomething()
The form method would look like:
def doSomething(self):
self.PrimaryBizobj.new(param1="foo", param2="bar",...)
In other words, form.new() is the simplest way of creating a new record. If you
need something more complicated, add a method to do so.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]