Send_plugin_message

I'm part-way through playing with a new plugin
in the best developer tradition, I started by "borrowing" an already working plugin that was sorta close to what i had in mind, but need more
(credits to @gmccauley thank you sir for showing me the light!)

all good so far

but (there's always a but) . . .
the plugin seems to call
self._plugin_manager.send_plugin_message(self._identifier, dict(action="startTimer"))
and
self._plugin_manager.send_plugin_message(self._identifier, dict(action="doneExecute"))

why would it do that?
why do other plugins care what I'm doing?

TIA

This is done to communicate from the Python part of the plugin to the JS part of the plugin. The Python part runs on the server, the JS part runs in the browser. They need to be able to talk to eachother.

ah!
so if I don't need to process those messages, I can just do away with them?
cheers

If you don't need to show something to the user at those points, then you probably don't need to tell the JS side of your plugin anything.

1 Like