From 285a16e0e784159fd2de2a462e3e9b9a5587fa3e Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Tue, 29 Aug 2023 21:13:25 +0200 Subject: [PATCH] semantics: fix weak ref error in plugin due to closed browser --- .../instance/changed.with..st | 7 ++++--- .../methodProperties.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/changed.with..st b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/changed.with..st index a7392e0..3f2ff97 100644 --- a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/changed.with..st +++ b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/changed.with..st @@ -2,8 +2,9 @@ updating changed: aspect with: anObject aspect = #insertTextReplacement ifTrue: - [self browser selectedSpecialMessage ifNotNil: [:specialMessage | - anObject first = specialMessage second "textSelector" ifTrue: - [self browser changed: aspect with: (anObject copy at: 1 put: #currentText; yourself)]]]. + [self browser ifNotNil: [:actualBrowser | + actualBrowser selectedSpecialMessage ifNotNil: [:specialMessage | + anObject first = specialMessage second "textSelector" ifTrue: + [actualBrowser changed: aspect with: (anObject copy at: 1 put: #currentText; yourself)]]]]. super changed: aspect with: anObject. \ No newline at end of file diff --git a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json index b9c30c5..00663ca 100644 --- a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json +++ b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json @@ -15,7 +15,7 @@ "aspectDependencies" : "ct 8/21/2023 03:09", "browser" : "ct 8/25/2023 23:55", "cancelSmartSummary" : "ct 8/21/2023 02:34", - "changed:with:" : "ct 8/21/2023 02:53", + "changed:with:" : "ct 8/27/2023 23:57", "conversation" : "ct 8/21/2023 02:26", "initializeForBrowser:" : "ct 8/27/2023 22:04", "requestSimilarConversations" : "ct 8/27/2023 21:59",