Hey Bill! You slumming over here?!? Nice to see you. I have been using Drew Speedie's VMP framework for my VFP work. He had one or two composite containers that are just dynamite in an application. One I use all the time is picklistvalid. It is a container that contains a label, a textbox, and command button and a display label. The code is all in the container and you just set a few properties and it does some amazing things. So with respect to this thread if two controls needed to talk to each other, I would put them in a container and put the composite class on the container.
Jeff Jeff Johnson [EMAIL PROTECTED] SanDC, Inc. 623-582-0323 Fax 623-869-0675 Bill Anderson wrote: > On Dec 19, 2007 11:46 AM, Ed Leafe <[EMAIL PROTECTED]> wrote: > >> On Dec 19, 2007, at 1:44 PM, Bill Anderson wrote: >> >>> Ed -- OO question -- when should a control know about a sibling >>> control? I'm trying to think of a case where that would be true and I >> can't come >>> up with one... >> Let's say you're creating a reusable component that is designed to >> drop on several forms. Since you can't assume anything about the >> form, your controls will communicate via self.Parent (i.e., the >> container in which they reside). But sometimes it's just simpler to >> work directly; imagine a check box that controls whether a text box >> is enabled or not. The code could be: >> >> def onHit(self, evt): >> self.Parent.txtPhone.Enabled = self.Value >> >> Sure, you can be purist and communicate via the container, but >> there's something to be said for simplicity sometimes. > > > OK, fair enough. > > In my mindset, those two controls should be in a container (VFP speak) and > communication directed to the container, then subclass the container as need > be. > > As you indicate, this can be considered overkill. > > Nevertheless, that's how I'd do it. > > Thanks, > > Bill > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ 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]
