Hi David,
Making the parameter vary at runtime is simple and just needs
some extra XML and python code. The parameter should be an argument to
the __init__ method (constructor) of your block and should have a ""
declaration in the matching XML file. Let's say the parameter name is
"variable_param" with a declaration like:
Variable parameter
variable_param
42
int
Then you need to add the following in the XML file:
set_variable_param($variable_param)
And you need to implement the "set_variable_param" method in your python class
to take whatever action is needed when the parameter value changes. This method
will be called every time the value of the expression in the underlined
"Variable parameter" box in the GUI changes. The method will look like:
def set_variable_param(self, new_value):
whatever code
This should make GRC underline the variable_param in the GUI and it will be variable
at runtime.
Thanks,
--Patrick