Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reflecting changes in multiple forms
Message
De
03/10/2006 08:05:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01158783
Message ID:
01158818
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

if you don't want that Form1 knows of Form2 and vice versa, introduce a third component, a mediator. Each Form will give that mediator a reference to itself at creation and informs the mediator of important variable or field chages. The mediaor then takes the approriate steps, eg refreshes Form1 if Form2 reports a change of a setting on which Form1 depends.

So the mediator is a behaviour object knowing what trigger what. You may also let Forms bind to a certain event within the mediator, so that it the intelligence could also stay in the forms.

In this case of forms, you could put the mediator logic into your form handler, if you have one. In general a mediator is somthing like the moderator of a talk show, it's a design pattern.

Bye, Olaf.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform