Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Triggering a timer early
Message
From
04/09/2015 08:44:28
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01624258
Message ID:
01624265
Views:
54
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.
>
Previous
Reply
Map
View

Click here to load this message in the networking platform