On 6/9/11 9:29 AM, Nate Lowrie wrote:
> ok, that sounds good.  I like this commit.  We finally have a clean
> way of pushing the bizobj into the dialog.

I hesitated for years, because I couldn't work out if I would just be 
perpetuating a 
design flaw: two (in my mind) meanings of "Form":

1) The UI-level frame or dialog with a title bar containing panels and controls.

2) The mediator between the UI and Biz layers.

When code references self.Form, sometimes they want it in the context of #1 and 
sometimes #2, but in Dabo the distinction is blurred, which has been bugging me 
for 
years.

But I realized, in a code review of my app, that I have all kinds of code to 
hold 
references to the proper bizobj in my dialogs, when in fact the parent form of 
that 
dialog already holds those references. I can now remove all that code and let 
Dabo 
walk up the containership tree to find the dForm to get the bizobj.

I still think maybe we should have considered making self.Form and 
self.BizMediator, 
the former being the reference to the UI-level container (dDialog or dForm), 
and the 
latter being the reference to the top dForm where all the bizmediator stuff 
like 
first() and requery() and getBizobj() lives.

But this commit works to solve the main issue, so I too am glad I finally did 
it.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to