Unable to change the value of a text param at runtime
Closed this issue · 1 comments
bcongdon commented
I'm getting an error at runtime when I try to update a text based param:
Traceback (most recent call last):
File ".../vsketch/venv/lib/python3.8/site-packages/vsketch_cli/param_widget.py", line 115, in update_param
self._param.set_value_with_validation(self.text())
AttributeError: 'TextParamWidget' object has no attribute 'text'
It looks like that error is coming from here:
vsketch/vsketch_cli/param_widget.py
Line 115 in 3501ec1
self.text()
?
To repro:
class Sketch(vsketch.SketchClass):
my_param = vsketch.Param("abc")
Run vsk run sketch
, and then try to change the value of "my_param" using the text input.
abey79 commented
Hello, thanks for the report. I'll have to check tomorrow, but I maybe that str
-based vsketch.Param
instances require the choices
parameter. The generic text field might not yet be implemented. If so, this would definitely be a shortcoming that needs addressing.