Recent

Author Topic: Cross platform DirectoryWatcher  (Read 11976 times)

constructor

  • Newbie
  • Posts: 1
Re: Cross platform DirectoryWatcher
« Reply #15 on: June 13, 2022, 08:06:49 pm »
when building, it's saying that OnFileEvent needs more parameters. On the demo app, the problem doesn't occur.
Any clue?

Hi,
I got Error: Wrong number of parameters specified for call to "OnFileEvent" when using
Code: Pascal  [Select][+][-]
  1. {$mode objfpc}{$H+}
and replacing it with
Code: Pascal  [Select][+][-]
  1. {$mode Delphi}{$H+}
fixed it.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11919
  • FPC developer.
Re: Cross platform DirectoryWatcher
« Reply #16 on: June 14, 2022, 11:13:51 am »
Assignment of procedure/method types requires an @ in objfpc and fpc modes.

If you change to tp or delphi mode, you have to remove or ifdef them

r.lukasiak

  • Full Member
  • ***
  • Posts: 167
Re: Cross platform DirectoryWatcher
« Reply #17 on: September 29, 2023, 07:44:18 am »
@marcov
this did the trick! thank you!


eny

  • Hero Member
  • *****
  • Posts: 1646
Re: Cross platform DirectoryWatcher
« Reply #18 on: September 28, 2024, 07:50:29 pm »
Warning for anyone who ends up here: there are quite some problems with the way it's implemented.
The most problematic one (on Windows 10): the dw cannot be stopped/destroyed.
Trying to do so will trigger an Access Violation error.
All posts based on: Win10 (Win64); Lazarus 3_4  (x64) 25-05-2024 (unless specified otherwise...)

 

TinyPortal © 2005-2018