Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Observer Pattern for Inter-Form Communication?
Message
 
To
05/06/1998 11:27:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00105110
Message ID:
00105298
Views:
27
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform