Hello Lucas,
the implementation of the OnSet methods is correct. The modifcation of the Type attribute is not the right approach. All properties are already declared with the right types: the properties in TestWindow and TestDialog are declare as being able to store a reference to an int32 property. This int32 property is defined within the DeviceClass and accessible via an instance (the autoobject) of the DeviceClass.
- Please change the attribute Type of the both properties in TestWindow and TestDialog back to ^int32.
Maybe the cause why it is still not working is an error in my above explication. Thus please try following:
- Leave the both properties TestsW in TestWindow and TestDialog initialized with the defailt value null.
- Wherever you create and show TestWindow or TestDialog, modify the value of their property TestsW to refer to the property TestsW of the autoobject. You assign the expression ^VSG::Device.TestW to those properties.
Just in the moment you perform the above assignment, the TestWindow or TestDialog component will establish a connection to the DeviceClass and register a slot method as observer.
Maybe it will help you to read following articles describing the usage of references to properties as well as the concept of notifications:
Outlet properties
Notifications and Observer
Best regards
Paul Banach