Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Observer Pattern for Inter-Form Communication?
Message
 
À
05/06/1998 11:27:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00105110
Message ID:
00105298
Vues:
26
>Yup, this is a great way to go.
>
>I just want to point out that you can have a 'Push' observer (send an Update() message upon events) or a pull observer, wherin a timer polls the situation and keeps things in synch. I like the pull observer option because all the code is in one place and there's incentive to keep it lean and simple.

I was favoring the pull observer too...but did you say timer? (Michael makes the sign against evil toward Steven) ;).

Actually, the pattern I was developing I called a "Sibling Pattern". Siblings are capable of bi-directional communication. So, say you had a form with a parent and a child grid. Double-clicking on the child grid will bring up a child edit form. Not only should you be able to go back to the parent form and navigate and see the changes in the child, but you should be able to make changes to the child and see the changes in the parent form.

I see your point in using a timer now. Whereas my changes will not be seen until the form activates your changes will be seen right away. Ok, so it was a good idea, but I still don't like timers ;>.

As I understood it, communication in an Observer pattern was a one-way affair...is that correct?

Michael G. Emmons
memmons@nc.rr.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform