From 968faea957c2d15fd24c0423f0d543e0689986fc Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Fri, 28 Mar 2025 15:02:10 +0100 Subject: [PATCH 1/3] Reduced UIManager api -Called a ```GrowlMorph``` to not have a UIManager call in ```SpInvalidUserInputError``` --- src/Spec2-Commander2/SpInvalidUserInputError.extension.st | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Spec2-Commander2/SpInvalidUserInputError.extension.st b/src/Spec2-Commander2/SpInvalidUserInputError.extension.st index c45a4d4f..d9c32453 100644 --- a/src/Spec2-Commander2/SpInvalidUserInputError.extension.st +++ b/src/Spec2-Commander2/SpInvalidUserInputError.extension.st @@ -3,7 +3,9 @@ Extension { #name : 'SpInvalidUserInputError' } { #category : '*Spec2-Commander2' } SpInvalidUserInputError >> actForSpec [ "Does nothing on purpose." - UIManager default - inform: self messageText. + + GrowlMorph new + contents: self messageText; + openInWorld. self flag: #TODO "In the best world, we should delegate the behaviour to the Spec presenter which originated the error." ] From 4328057371b28b7c98d2cd54a338be8e7f828f59 Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Fri, 28 Mar 2025 15:46:47 +0100 Subject: [PATCH 2/3] Replaced Morphic call by a SpInformDialog presenter --- src/Spec2-Commander2/SpInvalidUserInputError.extension.st | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Spec2-Commander2/SpInvalidUserInputError.extension.st b/src/Spec2-Commander2/SpInvalidUserInputError.extension.st index d9c32453..bc199f95 100644 --- a/src/Spec2-Commander2/SpInvalidUserInputError.extension.st +++ b/src/Spec2-Commander2/SpInvalidUserInputError.extension.st @@ -3,9 +3,9 @@ Extension { #name : 'SpInvalidUserInputError' } { #category : '*Spec2-Commander2' } SpInvalidUserInputError >> actForSpec [ "Does nothing on purpose." - - GrowlMorph new - contents: self messageText; - openInWorld. + + SpInformDialog new + label: self messageText; + openDialog. self flag: #TODO "In the best world, we should delegate the behaviour to the Spec presenter which originated the error." ] From 53e806b5a4a8981cb97a9fef4e00c917430fb39d Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Fri, 28 Mar 2025 16:00:26 +0100 Subject: [PATCH 3/3] Use spec application instead because we cant deal with headless images for now --- src/Spec2-Commander2/SpInvalidUserInputError.extension.st | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Spec2-Commander2/SpInvalidUserInputError.extension.st b/src/Spec2-Commander2/SpInvalidUserInputError.extension.st index bc199f95..43f679a8 100644 --- a/src/Spec2-Commander2/SpInvalidUserInputError.extension.st +++ b/src/Spec2-Commander2/SpInvalidUserInputError.extension.st @@ -4,8 +4,6 @@ Extension { #name : 'SpInvalidUserInputError' } SpInvalidUserInputError >> actForSpec [ "Does nothing on purpose." - SpInformDialog new - label: self messageText; - openDialog. + SpApplication defaultApplication inform: self messageText. self flag: #TODO "In the best world, we should delegate the behaviour to the Spec presenter which originated the error." ]