From cc84ffc33e9349754a8e0e9414bb146d20a35e81 Mon Sep 17 00:00:00 2001 From: Jan Bliznicenko Date: Wed, 23 Oct 2024 17:21:24 +0200 Subject: [PATCH] reworked subscriptions --- repository/OpenPonk-BPMN/OPBPMNDataObjectController.class.st | 2 +- repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st | 2 +- repository/OpenPonk-BPMN/OPBPMNElementController.class.st | 2 +- repository/OpenPonk-BPMN/OPBPMNNodeController.class.st | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/repository/OpenPonk-BPMN/OPBPMNDataObjectController.class.st b/repository/OpenPonk-BPMN/OPBPMNDataObjectController.class.st index 0098af7..e0b4b5e 100644 --- a/repository/OpenPonk-BPMN/OPBPMNDataObjectController.class.st +++ b/repository/OpenPonk-BPMN/OPBPMNDataObjectController.class.st @@ -46,7 +46,7 @@ OPBPMNDataObjectController >> internalSubscribeTo: aModel [ super internalSubscribeTo: aModel. aModel - when: OPBPMNPlaceTokensChanged + weakWhen: OPBPMNPlaceTokensChanged send: #modelChanged to: self ] diff --git a/repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st b/repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st index 6561b75..e2a5a83 100644 --- a/repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st +++ b/repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st @@ -27,7 +27,7 @@ OPBPMNEdgeController >> headMarker [ OPBPMNEdgeController >> internalSubscribeTo: aModel [ super internalSubscribeTo: aModel. - aModel when: OPElementRemoved send: #removeControllerAndDiagramElement to: self + aModel weakWhen: OPElementRemoved send: #removeControllerAndDiagramElement to: self ] { #category : 'private' } diff --git a/repository/OpenPonk-BPMN/OPBPMNElementController.class.st b/repository/OpenPonk-BPMN/OPBPMNElementController.class.st index 93fe95b..33b555b 100644 --- a/repository/OpenPonk-BPMN/OPBPMNElementController.class.st +++ b/repository/OpenPonk-BPMN/OPBPMNElementController.class.st @@ -18,5 +18,5 @@ OPBPMNElementController >> dependentElements [ OPBPMNElementController >> internalSubscribeTo: aModel [ super internalSubscribeTo: aModel. - aModel when: OPBPMNPlaceTokensChanged send: #modelChanged to: self + aModel weakWhen: OPBPMNPlaceTokensChanged send: #modelChanged to: self ] diff --git a/repository/OpenPonk-BPMN/OPBPMNNodeController.class.st b/repository/OpenPonk-BPMN/OPBPMNNodeController.class.st index 139fa2f..10315ec 100644 --- a/repository/OpenPonk-BPMN/OPBPMNNodeController.class.st +++ b/repository/OpenPonk-BPMN/OPBPMNNodeController.class.st @@ -22,7 +22,7 @@ OPBPMNNodeController >> buildEditorForm: aForm [ OPBPMNNodeController >> internalSubscribeTo: aModel [ super internalSubscribeTo: aModel. - aModel when: OPElementRemoved send: #removeControllerAndDiagramElement to: self + aModel weakWhen: OPElementRemoved send: #removeControllerAndDiagramElement to: self ] { #category : 'testing' } @@ -33,6 +33,5 @@ OPBPMNNodeController >> isHideable [ { #category : 'private' } OPBPMNNodeController >> removeModel [ - self model announcer unsubscribe: self. self model owner remove: self model ]