Skip to content

In case of a DictFeat, LabeledFeatWidget._widget doesn't have a value_to_feat method and communication fails #65

Open

Description

@thibaudruelle

Context: I ran start_test_app on an instance of a custom driver which contained a DictFeat and clicked on its set button. The following error shows up after closing the Test Panel:

Traceback (most recent call last):

  File "C:\Anaconda3\lib\site-packages\lantz\ui\widgets.py", line 470, in on_set_clicked
    self._widget.value_to_feat()

AttributeError: 'DictFeatWidget' object has no attribute 'value_to_feat'

Note that there is no runtime error since the value_to_feat method is never called (see Issue "In case of DictFeat, DriverTestWidget.update_on_change() has no effect").

Probable origin: In case of a DictFeat, LabeledFeatWidget._widget is a DictFeatWidget, which doesn't have a value_to_feat method.

Probable fix: add the value_to_feat method to DictFeatWidget

Proposed fix: add to DictFeatWidget

def value_to_feat(self):
        return self._value_widget.value_to_feat()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions