Recent

Author Topic: Cross platform DirectoryWatcher  (Read 7626 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: 10301
  • 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

 

TinyPortal © 2005-2018