Details
-
Story
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
NEW
-
NEW
Description
Ideally, make it impossible by making beforeVariableChanged accept BasicVariableDescriptor. This might require redesign of the variable descriptors type hierarchy. BasicVariableDescriptor is now a child of GenuineVariableDescriptor. Without changing that, it wouldn't be possible for variable listeners to change "basic" shadow variables.
The proposal above only applies to the InnerScoreDirector, that takes a variable descriptor as one of the arguments.
The public APIs (ScoreDirector, ProblemChangeDirector, IncrementalScoreCalculator) identify a variable using the variableName string. In this case it's only possible to detect the illegal call in runtime and throw an exception.