Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Triggering a timer early
Message
De
04/09/2015 08:44:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01624258
Message ID:
01624265
Vues:
53
Granted that the answer is in line with the OP formulation, such implementations run against "events should call methods".
Here a separate method/function (on app, form, biz layer or library function) should be called both from keypress and timer.timer

In case this is done as a pattern often in the fwk, implement an "externalCall" method on timer class up heritage after checking with the archtictural guru again that this is the wanted/state of the art approach ;-)

Bordering on silly for such a tiny functionality, but it is better to keep clean habits.




>>Thanks Lutz
>>
>>I don't think I explained myself properly.
>>
>>I want to trigger the code in the time event early
>>
>>I suppose I could set the interval to a very small value and reset it back when the code has run?
>
>Just call the method:
>
>...
>thisform.Timer1.Enabled = .f.
>
>thisform.Timer1.Timer()
>
>thisform.Timer1.Reset()
>thisform.Timer1.Enabled = .t.
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform