Trigger a custom module function from a widget?

Hello there,

I've created a custom module that starts with a function that's browsing a directory and loading the file content in a variable.

Since the files and/or the file content might change in the directory, I'd like to add a widget that allows to rescan & reload the content.
To do this, I thought about calling the function in the custom module from a widget (button).
But I can't find the way to do it.

If someone knows or has a better idea, I'm all in.

All the best,

Loïc

You need to send an osc message with the widget and then catch it using the custom module's oscOutFilter function. Widgets cannot access the custom module's context and vice versa, they communicate using osc messages. (+ [solved] Basic Filesystem operations - #6 by jean-emmanuel)