Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-07

I need TTimer (or equivalent) in a CLI program.

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Donald Ziesig

I am writing a command line program that will be started as root from /etc/init.d. (Raspberry PI that will not be connected to the internet.)

This program requires TTimer, which seems to be a part of LCL and gives me missing units at compile time.

To try to get around LCL, I derived a timer from TCustomTimer. Unfortunately, this pulls in TWidgetSet (also part of LCL but without the missing units) and I get run time error 211 since TWidgetSet is abstract.

Is there any timer-like component available without bringing in LCL?

Thanks,

Don Ziesig

Reply by email

Donald Ziesig
to Donald Ziesig
Donald Ziesig wrote 20 lines
I am writing a command line program that will be started as root from /etc/init.d. (Raspberry PI that will not be connected to the internet.) This program requires TTimer, which seems to be a part of LCL and gives me missing units at compile time. To try to get around LCL, I derived a timer from TCustomTimer. Unfortunately, this pulls in TWidgetSet (also part of LCL but without the missing units) and I get run time error 211 since TWidgetSet is abstract. Is there any timer-like component available without bringing in LCL? Thanks, Don Ziesig

OOPS, I forgot to mention, I found TFPTimer, but it does not implement the OnTimerStart and OnTimerStop events which I need as well. Now that I am thinking about it, perhaps I can derive something from that that implements those event callbacks.

Reply by email

Mattias Gaertner
to Donald Ziesig
[...] > Is there any timer-like component available without bringing in LCL?

Yes, TFPTimer. You found it.

OOPS, I forgot to mention, I found TFPTimer, but it does not implement the OnTimerStart and OnTimerStop events which I need as well. Now that I am thinking about it, perhaps I can derive something from that that implements those event callbacks.

Good idea.

Mattias

Reply by email

Michael Van Canneyt
to Donald Ziesig: OOPS, I forgot to mention, I found TFPTimer, but it does not implement the OnTimerStart…
Donald Ziesig wrote 25 lines
On 07/20/2016 05:04 PM, Donald Ziesig wrote: > I am writing a command line program that will be started as root from > /etc/init.d. (Raspberry PI that will not be connected to the internet.) > > This program requires TTimer, which seems to be a part of LCL and > gives me missing units at compile time. > > To try to get around LCL, I derived a timer from TCustomTimer. > Unfortunately, this pulls in TWidgetSet (also part of LCL but without > the missing units) and I get run time error 211 since TWidgetSet is > abstract. > > Is there any timer-like component available without bringing in LCL? > > > Thanks, > > > Don Ziesig > > OOPS, I forgot to mention, I found TFPTimer, but it does not implement the OnTimerStart and OnTimerStop events which I need as well. Now that I am thinking about it, perhaps I can derive something from that that implements those event callbacks.

A patch for this will certainly be accepted.

Michael.

Reply by email

vfclists .
to Michael Van Canneyt
Michael Van Canneyt wrote 41 lines
On Wed, 20 Jul 2016, Donald Ziesig wrote: On 07/20/2016 05:04 PM, Donald Ziesig wrote: > >> I am writing a command line program that will be started as root from >> /etc/init.d. (Raspberry PI that will not be connected to the internet.) >> >> This program requires TTimer, which seems to be a part of LCL and gives >> me missing units at compile time. >> >> To try to get around LCL, I derived a timer from TCustomTimer. >> Unfortunately, this pulls in TWidgetSet (also part of LCL but without the >> missing units) and I get run time error 211 since TWidgetSet is abstract. >> >> Is there any timer-like component available without bringing in LCL? >> >> >> Thanks, >> >> >> Don Ziesig >> >> >> OOPS, I forgot to mention, I found TFPTimer, but it does not implement > the OnTimerStart and OnTimerStop events which I need as well. Now that I > am thinking about it, perhaps I can derive something from that that > implements those event callbacks. > A patch for this will certainly be accepted. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

Isn't the NoGUI widget set useful in this instance?

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160728/22631acb/attachment.html>

Reply by email