I get a java.lang.ClassCastException when trying to do it the second way. Shouldn’t using self.custom.property_here and the value parameter be of same type if they reference the same thing?
What's the exact ClassCastException, or what does system.perspective.print(str(type(value))) tell you?
<type 'com.inductiveautomation.perspective.gateway.script.JsonifiableArrayList'>
this is the type returned by that the other type for self.custom.completed is
<type 'com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$ArrayWrapper'>
Gotcha. I want to say this is a known thing, where we're unfortunately stuck because of backwards compatibility. You are correct, in theory these are the same things and should react the same way.
While this is silly, does this work with either format?
completed = [v for v in value]
# completed = [v for v in self.custom.completed]
Doesn’t work with value, only works with self.custom.completed
1 Like

