From 64424033f1788f154e17083661612cdd97d81351 Mon Sep 17 00:00:00 2001 From: Milton Mamani Torres Date: Thu, 29 Jul 2021 16:25:25 -0400 Subject: [PATCH] added fix for gtexamples in pharo9 --- src/Roassal2GT/GtExampleMethodIcon.extension.st | 6 ++++++ src/Roassal2GT/RTAbstractViewContext.class.st | 2 +- src/Roassal2GT/RTExampleSelection.class.st | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/Roassal2GT/GtExampleMethodIcon.extension.st diff --git a/src/Roassal2GT/GtExampleMethodIcon.extension.st b/src/Roassal2GT/GtExampleMethodIcon.extension.st new file mode 100644 index 00000000..77ca6a4f --- /dev/null +++ b/src/Roassal2GT/GtExampleMethodIcon.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #GtExampleMethodIcon } + +{ #category : #'*Roassal2GT' } +GtExampleMethodIcon class >> fixedBase64String: aString [ + ^ Form fromBinaryStream: aString base64Decoded readStream +] diff --git a/src/Roassal2GT/RTAbstractViewContext.class.st b/src/Roassal2GT/RTAbstractViewContext.class.st index da0681ac..5ac6d5a4 100644 --- a/src/Roassal2GT/RTAbstractViewContext.class.st +++ b/src/Roassal2GT/RTAbstractViewContext.class.st @@ -42,7 +42,7 @@ RTAbstractViewContext class >> setOnView: aView [ ] { #category : #public } -RTAbstractViewContext >> adjustView: aView inPresentation: aPresentation. [ +RTAbstractViewContext >> adjustView: aView inPresentation: aPresentation [. self view: aView. self presentation: aPresentation. self registerCallbacks diff --git a/src/Roassal2GT/RTExampleSelection.class.st b/src/Roassal2GT/RTExampleSelection.class.st index abb45302..eded4fed 100644 --- a/src/Roassal2GT/RTExampleSelection.class.st +++ b/src/Roassal2GT/RTExampleSelection.class.st @@ -120,6 +120,16 @@ RTExampleSelection >> gtSpotterPreviewIconIn: aComposite [ ] +{ #category : #'PRAGMA-SELECTORS' } +RTExampleSelection >> iconSelectorBase64: aSelector [ + + + + form := (self methodResolverClass resolve: GtExampleMethodIcon example: self selector: aSelector) + converter: #fixedBase64String:; + yourself +] + { #category : #testing } RTExampleSelection >> matchesQuery: aSetOfNames [ | sourceCode |