-
Bug
-
Resolution: Obsolete
-
Minor
-
0.1, 0.2
-
None
The setProperty method of the SequencerOutput method, as it currently exists, accepts arbitrary single Objects or arrays of Objects as property values via its use of "Object..." in the method signature. In DNA-77, it was suggested that the current method definition should be replaced with multiple type-specific methods, but it was decided to not do this, and instead recommend use of ValueFactory to create the values used in this method.
The problem with this is that, by leaving the interface as is and having use of ValueFactory be optional, it is easy for users to set properties to value types that are not currently supported (meaning that they will see a run-time error somewhere else in the code in these cases, rather than a compile-time or run-time error at the actual point where the issue was introduced (their misuse of setProperty).
One possible way to enforce this in the interface is to define the interface as throwing some sort of exception if the value is not an instance of an allowed class. Another solution would be a more substantial revision of the interface to mandate use of ValueFactory to create property values.