Ed, I'm not necessarily responding to your points, even though it might 
be read that way. Just discussing.

Ed Leafe wrote:
> On Jul 14, 2008, at 10:51 AM, Nate Lowrie wrote:
> 
>> This is meant to be a discussion and a feature request.  In designing
>> my Dabo apps, I love how I can add my bizobjs to the form and then I
>> just need to set a controls DataSource to the table to grab data from
>> and the Form automatically finds the bizobj reference.  However, this
>> breaks down for dialogs.  Dialogs don't keep track of Bizobj
>> references.  I use dialogs for data entry and edit.
> 
> 
>       Dialogs are not meant for data entry and editing. They are for short  
> interactions, not for extended editing.

There's a ticket for data-aware dialogs I think. I agree that dialogs 
are for showing, getting data entries from the user, and closing. 
However I don't really agree that the controls in them shouldn't be 
attached to bizobjs.


>> They look and feel better than editing from a grid and most of my  
>> clients prefer the dialogs to a grid.
> 
>       ???
>       
>       What does one have to do with the other? You can have grids in  
> dialogs, too, you know.

I'm confused, too. I guess there's some modality associated with grid 
editing, like there is with editing in a dialog.

I never make editable grids. Well, almost never. Instead I usually make 
grids that, when a row is dbl-clicked, a dialog is shown with the fields 
to edit. These fields are bound to the correct bizobj, that is 
maintained by the form. From the context of a dialog, 
self.Form.getBizobj(...) will get the correct biz reference.

When the 'okay' button is pushed, the child biz gets a save(). Else, it 
gets a cancel().


>> That said, Dabo doesn't make it easy to build data
>> aware dialogs.  There are several options, but most often I import
>> bizobj instances through the __init__ method and subsequently have to
>> set DataSources for controls to something along the lines of
>> "self.Parent._myBizobj".
> 
>       Or you could say "form.myBizobj". BTW, it seems odd that you are  
> marking the bizobj reference as private by using a leading underscore  
> when you want to expose it to your controls.
> 
>       But since dialogs are not meant to hang around, the way to deal with  
> data is to pass in what you need, set the controls to those values,  
> and then query the controls for the values after the dialog is hidden.

Yep.


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