Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When I release last object reference, what should happen
Message
De
19/07/2000 23:01:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00394466
Message ID:
00394726
Vues:
9
>So I took my generic subclass of TIMER and gave it two properties: OnTimerMethod and OnTimerObject. When the timer goes off, it executes (basically) this.OnTimerObject.&OnTimerMethod(). All that worked, but ... aha! .. there is my other reference to the timer.

I've done something sort of similar, actually- I created a timer that could be passed an object and a method name to be used to create a sort of asynchronous method calling mechanism- only in my case, the timer would only execute once, and then set its interval proprety to 0.

Without really understanding what you want to use this for, my only suggestion is that you handle the execution a little differently by using EVAL() instead of macro subsitution:

lvResult = EVAL("THIS.OnTimerObject." + THIS.OnTimerMethod + "()")
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform