[Lazarus] Bug ou Característica do Lazarus | Lazarus Bug or Feature
Guionardo Furlan
guionardo at gmail.com
Mon Feb 15 16:25:06 CET 2010
Hi,
I'm a pascal newbie, after spending some time getting a daemon to work, I now have trouble getting a timer to work. I was recommended to use TFPTimer from the fpTimer unit - http://mantis.freepascal.org/view.php?id=14118&nbn=5
I tried the following code but the OnTimer doesn't trigger. There are no errors either. Grateful for any pointers. :)
uses
fpTimer;
...
TDaemon1 = class(TDaemon)
....
private
.....
public
procedure FTimerTimer( Sender : TObject );
.....
var
Daemon1: TDaemon1;
FTimer : TFPTimer;
.....
procedure TDaemon1.FTimerTimer( Sender : TObject );
var
...
BEGIN
....
END;
procedure TDaemon1.DataModuleStart(Sender: TCustomDaemon; var OK: boolean);
var
...
begin
FTimer := TFPTimer.Create(nil);
FTimer.OnTimer := @FTimerTimer;
FTimer.Interval := 1000; // in milliseconds
FTimer.Enabled := True;
FTimer.StartTimer;
Note: I've also posted here - http://lazarus.freepascal.org/index.php/topic,8615.0.html
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100215/352ce32e/attachment-0004.html>
More information about the Lazarus
mailing list