Talk:CudaText API

From Lazarus wiki
Revision as of 13:21, 4 February 2017 by Alextp (talk | contribs) (→‎timer_proc: todo: new section)
Jump to navigationJump to search
(no topics here)

timer_proc: todo

timer_proc(id, callback, interval)

Perform action on timers.

  • callback: String in the form "module_name.method_name". App will call "method_name()" in the class "Command", in specified module (e.g. "cuda_my_plugin").
  • interval: Timer delay in msec. Need to specify on starting timer, value 50+.

Possible values of id:

  • TIMER_START - Create (if needed) and start timer, infinite ticks.
  • TIMER_START_ONE - Create (if needed) and start timer, for single tick.
  • TIMER_STOP - Stop timer.
  • TIMER_DELETE - Stop and delete timer (free memory).

Result is True if params ok; False if params not ok (callback str incorrect, interval incorrect on starting, not created callback on stopping); or None.