Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subject - Observer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01041764
Message ID:
01042262
Vues:
28
>Hi Naomi (it sure feels strange to call you that!)
>
>26578 is your UT member number. :-)
>
>I think you're opening your self for problems, unless after the timer's expiration you run some checks instead of just blindly requerying the manager's form. I think it could work.
>
>Re. the bizobj's, if you have your own sub-class from the framework's bizobj, you can add functionality to do exactly what you need.
>
>I'd do a combination of using the before and after update events. Before, to get whoever is "listening" or "observing" in a ready state (if you need that at all) and the "after" to complete the observation.
>
>You can always send messages up and down the objects' food chain.
>
>Finally, if this is vfp9, you can raise events (not sure if vfp8 supports that) and respond to them. And if raising events doesn't work, take a close look at how Kevin implemented the security setup in the framework.
>
>He used a very clever trick: he gave each control a special property and added code to its "assign" method. Then he calls SetAll from another object, and whichever other object in scope that has this property, responds by having its assign method fire.
>
>Hope this helps!
>
>alex
>

Alex, hi again!

I was thinking about the problem last couple of days and I'll send an e-mail to our group to brain storm that problem.

For the local form's refreshing I solved the problem very easily using subject-observer mechanism. Since OnStateChange fires before the transaction is commited, I just enable the timer on my Manager's screen. In 1 sec. it fires, refreshes the number and goes back to sleep. This works quite nicely.

To refresh it from the Network would be a different story. I can, of course, put code in the Update Trigger of a table. However, I don't think it would be a good idea performance wise.

I can put a timer on manager's form and just refresh it, say, every 5 minutes. I have to make sure, that timer is not active when the application is minimised or the user switched to another task...

The third idea is to write or create a file somewhere on the Network and have my form respond to its creation (I guess, it could be done in VFP9, I need to read up on this topic).

None of these ideas looks like a way to go. So, may be you see a better way...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform