On Mar 8, 2007, at 4:16 PM, [EMAIL PROTECTED] wrote:

> Now the tricky part.
> I want to add another button to the above panel, 'create new viewer  
> panel'.
> This should set up another instance of viewerPanel, and append it to
> viewerSizer.
> The tricky part for me: this should have different constraints than
> the first instance.
> I should be able to go to page 1, change the constraint settings, go
> back to page 2, and neither viewerPanels should have changed.
> If I click on the 'update constraints' button on the first viewerPanel
> instance, only it should update (with the new constraints.)
> Same thing for the second instance.
>
> Do I need a bizObj/viewerPanel?
> If so, should I create it in beforeInit of the panel?

        Sounds to me like you're taking snapshots of the data, and  
displaying them independently of each other. Is that correct? If so,  
does the data need to be read/write, or is it for display only?

> And, is there a shorthand way to update the datasource on all the
> contained controls in the panel?  (Not that looping is too difficult
> :-) )  That could go in afterInit, correct?

        Probably you'll have to add some logic to your bizobj class to  
handle these 'snapshots'. There is already a similar facility for  
this in the _CurrentCursor property, which is designed to handle  
multiple sets of child records, and this cursor is based on the key  
value of the parent. Perhaps you could create a key value for each of  
your viewer panels, update bizobj._CurrentCursor when the active  
panel changes. Take a look at that property and let me know if it  
makes any sense to you.

        Managing the 'active' viewer will be the trickiest part of the whole  
thing, especially if you are planning on being able to edit and save  
changes to the data.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to