johnf wrote: > On Tuesday 12 June 2007 09:30, Paul McNett wrote: >> Ed Leafe wrote: >>> On Jun 12, 2007, at 12:08 PM, Paul McNett wrote: >>>>> Ed suggested that the "self.bizSecondary" NOT be added to the >>>>> Form????? >>>> I must have missed that message, but I'm sure he had a good reason for >>>> that! Personally, I add all my bizobjs to my forms. >>> I was assuming that 'self' in the example *was* the form. The only >>> question was: >>> >>> grid.DataSource = self.bizSecondary >> This isn't mediated through the form, even though 'self' is the form. >> >>> vs. >>> >>> grid.DataSet = self.bizSecondary.getDataSet() >> ...and neither is this. > Sorry I mis-spoke - I should have said "add the self.bizSecondary as a bizobj" >> class MyBizobj... > >> self.bizMain = MyBizobj(conn) >> self.addBizobj(self.bizMain) >> self.bizSecondary = MyBizobj(conn) > below is my ref to Ed's comment. >> # Don't add the second bizobj to the form > > Of course the "self" in self.bizSecondary is the 'Form". I think Ed was > saying not to add the bizobj to the Form as in > self.addBizobj(self.bizSecondary). > > Paul assuming you add the self.bizSecondary as a form bizobj do you set it > read only? If not do you allow update, inserts etc. to occur? How would you > handle refreshing self.bizMain?
I misunderstood your use of bizSecondary. I didn't realize it was another instance of a bizobj that was already on the form. I should have realized it because it was plain from the subject and original message. I've done this, too, but I don't usually put these references at the form level as it usually turns out that I need them much more locally, such as in the grid itself or in the panel containing the controls that use this secondary bizobj. You never want to have two bizobjs with identical datasources registered with the form... -- pkm ~ http://paulmcnett.com _______________________________________________ Post Messages to: [email protected] 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/dabo-users/[EMAIL PROTECTED]
