DT var location bug

Issue #28 resolved
Павел Бельтюков created an issue

When I try to add location to DT variable, I get unhandled exception.

See Bug report.

Comments (3)

  1. Павел Бельтюков reporter

    The problem is in https://bitbucket.org/skvorl/beremiz/src/496029f768d92b1bb0f507d1835a2a69f55ec822/dialogs/BrowseLocationsDialog.py?at=default&fileviewer=file-view-default#BrowseLocationsDialog.py-117

    How about changing:

            self.BaseVarType = self.Controller.GetBaseType(self.VarType)
            self.VarTypeSize = LOCATION_SIZES[self.BaseVarType]
            self.Locations = self.Controller.GetVariableLocationTree()
    

    to

            self.BaseVarType = self.Controller.GetBaseType(self.VarType)
            try:
                   self.VarTypeSize = LOCATION_SIZES[self.BaseVarType]
            except exceptions.KeyError:
                   self.VarTypeSize = "L"
            self.Locations = self.Controller.GetVariableLocationTree()
    

    ?

  2. Log in to comment