[Gambas-user] Pb instanciating inotify watch

Tobias Boege taboege at gmail.com
Sat Mar 2 23:12:07 CET 2019


On Sat, 02 Mar 2019, Alarc'h wrote:
> Le Sat, 2 Mar 2019 20:22:19 +0100,
> Tobias Boege <taboege at gmail.com> a écrit :
> 
> > According to the documentation [1] this is the correct signature and
> > the source code agrees. You should see (or be able to find in the
> > "Debugging" tab of the panel on the bottom of the Gambas IDE window)
> > a stack trace when an error happens. Is the error raised in your code
> > or does the stack trace indicate that comes from *inside* gb.inotify?
> > 
> > FTR, I just created a blank project and pasted the line above.
> > It runs as expected. Which begs the question: which version of
> > Gambas do you use and where did you get it from?
> > 
> > Regards,
> > Tobi
> > 
> > [1] http://gambaswiki.org/wiki/comp/gb.inotify/watch/_new
> > 
> My version is  from the ppa : 
> 
> deb http://ppa.launchpad.net/gambas-team/gambas3/ubuntu xenial main
> 
> on Linux Mint 18.1 Serena
> 
> The complete procedure is : 
> 
> Public Sub Main()
>   ' Disable all unneeded events to increase performance
>   Dim hWatch As New Watch("/tmp/gambas." & Str$(User.Id), True, 0) As
> "GambasDirectory" 
>   ' Capture creation and deletion of files or directories
>   hWatch.Events.Create = True
>   hWatch.Events.Delete = True
>   Print "I'm watching... You may now start Gambas projects."
> End
> 
> And the error is in fact symbol 'create' unknown in class watch.events
> 
> And if I try to use watch.Create = True the error message is
> Watch.create is not a property...
> 

All these errors are correct. The current (and final) interface uses
the Events property as a virtual array indexed by the constants in
the Watch class. "hWatch.Events.Create = True" is written now

  hWatch.Events[Watch.Create] = True

I'm basically repeating what T Lee said because it wasn't clear to me
if his mail solved your problem completely or not.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list