Hello JK,
It seems, your implementation mixes references to properties with regular references to objects. The notifyobservers operations is applied on an instance of the class ValueStruct. The attachobserver, in turn, registers the observer for a property. So registered observer is intended to react on notifications associated to this property.
If refStruct does refer a property, which in turn does store an instance of the ValueStruct class, perform attachobserver onUpdateRef, refStruct^. This will attach the observer to the object stored actually in the property referred by refStruct.
See also in the sections attachobserver and notififyobservers the different forms 1 and 2 with an object and property reference as 'point of interest'.
Does it help you further?
Best regards
Paul Banach