Thanks for the reply Nate.
> Use the class designer or favorite text editor to create your
> vewierPanel class.  Make sure that you put the "create new viewer
> panel" button in.  Save that class.
>
> Store a reference to viewerSizer in the class so you can append stuff.
>  Include an event handler like this:
>
> def onHit_viewButton(self, evt):
>    newViewPanel = viewPanel(self.Parent, etc.)
>    self.viewerSizer.append1x(newViewPanel)
>
> That solves your creation problem.  If you want to not display the
> create panel button anymore just set self.viewButton.Visible to False.
>
Yes, that's the way I'm heading- especially now Ed has corrected my
understanding of how custom classes in the Class Editor do retain
behavior on insert.
I'll go you one better - I don't think I even need to keep a reference
to viewerSizer- I can give it a reg ID :-)



> Now for the updating part.  I assume that when update constraints is
> displayed you want to update various controls on various panels.   The
> class should have an update method that will query bizobj's and update
> the data that is called by the onHit_udateButton function.
>
Not quite.  In fact that's almost the opposite of what I want ;-)

Page 1 of tab viewer has a bunch of constraints (contents of where clauses.)
Page 2 has 1 or more viwerPanels, lets say 3 called a,b,c.
When I click on a's 'update' button, I want a (and only a) to update
the data displayed, based on the current values of the controls on
Page 1.  I don't want b or c to change.

To be honest, just talking about it, I think it makes a lot more sense
that Page 1 becomes a dialog, triggered by the update button on the
viewerPanel(s).

So the thing I'm not sure about is how to adjust the 'where
clauses'/filters on the bizObject connected to my test_results table,
and have that only cause an update of one viewerPanel, not all of
them.

Ed is suggesting keys and _CurrentCursor, that I suspect sounds like
the right way to go, but I don't yet understand how to create
keys/what they are/how to use them.

> That's all fine and dandy, but we still need a way of updating the
> other objects.  The most elegant way of doing this in my opinion is to
> implement the viewPanel class as a borg DP.  The shared state would be
> a list of viewPanels created.  Each class upon instantiation will add
> itself to the list.  On updating, a function can cycle through the
> list and update all of the panels.
>
If it doen't mean permanent assimilation, can you explain what you
mean by a borg DP? ;-)
Otherwise though, I think that's heading in the wrong direction to
what I want, but I'm not sure- what do you think?
Thanks!

Julian

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

Reply via email to