On Sun, May 17, 2009 at 2:51 AM, Ed Leafe <e...@leafe.com> wrote: > On May 16, 2009, at 12:55 PM, Miguel Lopes wrote: > > > I have MainForm with a dPageFrameNoTabs that holds several dPages > > (accounts, > > opportunities, servicecases). > > My goal is to have a single location to navigate, new, delete, save, > > and > > whatever actions are "common" to all the pages in the MainForm > > Toolbar (a > > VCR control). > > > > I think this is a design issue that should be quite common for data > > intensive applications that are not following the MDI or multi form > > interfaces - I mean those that try to keep all in one form, and open > > forms > > just for specific taks (typically in a modal fashion). I searched > > the lists > > for quite a while and am surprised to have very little regarding > > this design > > challenge. So I came decided to post this. > > > > I came up with the following approach, but am uncertain. Is there a > > Dabo way > > to accomplish this? I wonder what is your approach? > > > If you are using dPageFrameNoTabs, then that means that changing > the > active page is entirely under your control. I would probably add code > to the method that handles page changing to set the form's > PrimaryBizobj to the appropriate bizobj for the current page. This > way, the methods work as if the current page were its own form. > > > -- Ed Leafe >
That is my last experiment! Your answer (together with the other one on assigning bizobjs references to controls), means I probably have 90% of the problem solved. Txs! These are two of the methods that change dPage: def onBtnAccts(self, evt): self.splitter.Panel2.SelectedPageNumber = 0 self.PrimaryBizobj = self.bizobjDispatcher.getBizobjByRegID('account') def onBtnOpptys(self, evt): self.splitter.Panel2.SelectedPageNumber = 1 self.PrimaryBizobj = self.bizobjDispatcher.getBizobjByRegID('opportunity') Miguel --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/a19730800905161904h7a6af935gd9fc91568f9e7...@mail.gmail.com