Ignition 8.1.20
Perspective
Given an array property with a single object element containing a single field:
self.custom.arr[0] = { 'fieldName': 'initial value' } defined in the property tree of any component
Update that object in a script. The new value is available with the get(...) method, but not available through the typical x[key] method.
Example, in a change script:
o = self.custom.arr
o1 = o[0]
system.perspective.print(type(o1).name + ' | ' + o1['fieldName'])
o1['fieldName'] = 'hello world'
system.perspective.print(o1['fieldName'] + ' | ' + o1.get('fieldName', 'default'))
Produces:
12:47:13.236 [Browser Thread: 54390] INFO Perspective.Designer.Workspace - PropertyTreeScriptWrapper$ObjectWrapper | initial value
12:47:13.236 [Browser Thread: 54390] INFO Perspective.Designer.Workspace - initial value | hello world
Is this expected? Is this new?