Hello again,
After experimenting a bit, the Getter action worked of course perfectly so thanks for the help?
However, I run into another interesting nut to crack;
I have below the very simplified code: A thread class, a plugin class and the action class for the "getter"
When the thread initialises, it gets the "variable" current value from the plugin as input. When it runs, its responsibility is to change the variable in the plugin if the value changes
The getter action reads the variable from the plugin on demand
The getter works as expected but the thread never succeeds in changing the value in the plugin...any suggestions?
In other words maybe I can say that I would like to change a variable value in a plugin class from a thread class
Kind regards, Walter
Simplified thread
Code: Select all
class MyThread(Thread):
def __init__(
self,
variable
):
Thread.__init__(self, name="test")
self.name = name
self.aVariable= aVariable
def run(self):
while (self.abort == False):
if self.aVariable != aVariablePrevious:
self.plugin.variable = self.aVariable
The simplified plugin code
Code: Select all
class MyPlugin(eg.PluginClass):
def __init__(self):
self.started = False
def __start__(
self,
variable
):
self.variable = variable
self.started = True
The getter action
Code: Select all
class GetContentsOfVariable( eg.ActionClass ) :
def __call__( self ) :
return self.plugin.variable