diff --git a/source/Magritte-Model/MATPropertyOwner.trait.st b/source/Magritte-Model/MATPropertyOwner.trait.st index 94a43c2c..3a4ebbac 100644 --- a/source/Magritte-Model/MATPropertyOwner.trait.st +++ b/source/Magritte-Model/MATPropertyOwner.trait.st @@ -206,3 +206,16 @@ MATPropertyOwner >> whenPropertyChangedSend: aSelector to: aReceiver [ send: aSelector to: aReceiver ] + +{ #category : #subscriptions } +MATPropertyOwner >> whenPropertyChangedSend: aSelector to: aReceiver [ + | anAnnouncer | + anAnnouncer := self properties + at: #propertyAnnouncer + ifAbsentPut: [ Announcer new ]. + + ^ anAnnouncer weak + when: MAPropertyChangedAnnouncement + send: aSelector + to: aReceiver +]