From c5e073bc49999451c0fd8779fd761e76f834d863 Mon Sep 17 00:00:00 2001 From: SullyMLT Date: Mon, 25 Aug 2025 15:15:27 +0200 Subject: [PATCH 1/4] Fix the error asOrderedCollection does not understand (the fix is temporary) --- .../PyramidStampManagerPresenter.class.st | 3 +-- .../PyramidThemePropertyStrategy.class.st | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st b/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st index c0746fab..c3aae02d 100644 --- a/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st +++ b/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st @@ -31,9 +31,8 @@ PyramidStampManagerPresenter >> addRootsStampAddTreeTable: aElement [ { #category : #'as yet unclassified' } PyramidStampManagerPresenter >> allStampFromElement: aElement [ - | stampsCollection collectionOfStamps | + | stampsCollection | stampsCollection := OrderedCollection new. - collectionOfStamps := OrderedCollection new. aElement allStamps do: [ :aStamp | stampsCollection add: (PyramidProperty new diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st index 2f853a2d..21512ab0 100644 --- a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -7,18 +7,27 @@ Class { { #category : #'as yet unclassified' } PyramidThemePropertyStrategy >> propertiesFor: aCollectionOfElements [ - | elementsWithStyleSheetTheme allPossibleStamps allCommonStamps | - elementsWithStyleSheetTheme := aCollectionOfElements - asOrderedCollection select: [ + | elementsWithStyleSheetTheme allPossibleStamps allCommonStamps temp | + + self flag: 'the message asOrderedCollection is removed in pharo 13 as i know now the method have always 1 element in the aCollectionOfElements + + Need a refactorization of this part'. + + "Temp du to the problem with the message asOrderedCollection" + temp := OrderedCollection new. + temp add: aCollectionOfElements. + + elementsWithStyleSheetTheme := "aCollectionOfElements + asOrderedCollection"temp select: [ :element | element isAttachedToSceneGraph and: [ - element lookupTheme isKindOf: + aCollectionOfElements lookupTheme isKindOf: ToStyleSheetTheme ] ]. - elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. + elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. allPossibleStamps := elementsWithStyleSheetTheme collect: [ :each | PyramidSelectorPossibleStamps new - theme: each lookupTheme; - findAllStampsFor: each ]. + theme: elementsWithStyleSheetTheme lookupTheme; + findAllStampsFor: elementsWithStyleSheetTheme ]. allCommonStamps := allPossibleStamps first. allPossibleStamps do: [ :each | allCommonStamps := allCommonStamps & each ]. From f2251037024da715377ac564bcc724297b4af8d0 Mon Sep 17 00:00:00 2001 From: SullyMLT Date: Mon, 25 Aug 2025 16:16:52 +0200 Subject: [PATCH 2/4] Fix Temporary --- .../PyramidThemePropertyStrategy.class.st | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st index 21512ab0..252d3912 100644 --- a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -5,7 +5,7 @@ Class { } { #category : #'as yet unclassified' } -PyramidThemePropertyStrategy >> propertiesFor: aCollectionOfElements [ +PyramidThemePropertyStrategy >> propertiesFor: aElement [ | elementsWithStyleSheetTheme allPossibleStamps allCommonStamps temp | @@ -15,19 +15,19 @@ PyramidThemePropertyStrategy >> propertiesFor: aCollectionOfElements [ "Temp du to the problem with the message asOrderedCollection" temp := OrderedCollection new. - temp add: aCollectionOfElements. + temp add: aElement. - elementsWithStyleSheetTheme := "aCollectionOfElements + elementsWithStyleSheetTheme := "aElement asOrderedCollection"temp select: [ :element | element isAttachedToSceneGraph and: [ - aCollectionOfElements lookupTheme isKindOf: + element lookupTheme isKindOf: ToStyleSheetTheme ] ]. - elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. + elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. allPossibleStamps := elementsWithStyleSheetTheme collect: [ :each | PyramidSelectorPossibleStamps new - theme: elementsWithStyleSheetTheme lookupTheme; - findAllStampsFor: elementsWithStyleSheetTheme ]. + theme: each lookupTheme; + findAllStampsFor: each ]. allCommonStamps := allPossibleStamps first. allPossibleStamps do: [ :each | allCommonStamps := allCommonStamps & each ]. From b8a173f087b33dc6a827ca3bea1a646ce05601a5 Mon Sep 17 00:00:00 2001 From: SullyMLT Date: Mon, 25 Aug 2025 16:33:09 +0200 Subject: [PATCH 3/4] Fix the real one instead of the temporary Fix --- .../PyramidThemePropertyStrategy.class.st | 33 +++++-------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st index 252d3912..e2e30628 100644 --- a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -7,31 +7,16 @@ Class { { #category : #'as yet unclassified' } PyramidThemePropertyStrategy >> propertiesFor: aElement [ - | elementsWithStyleSheetTheme allPossibleStamps allCommonStamps temp | + | elementWithStyleSheetTheme allPossibleStamps | - self flag: 'the message asOrderedCollection is removed in pharo 13 as i know now the method have always 1 element in the aCollectionOfElements - - Need a refactorization of this part'. - - "Temp du to the problem with the message asOrderedCollection" - temp := OrderedCollection new. - temp add: aElement. - - elementsWithStyleSheetTheme := "aElement - asOrderedCollection"temp select: [ - :element | - element isAttachedToSceneGraph and: [ - element lookupTheme isKindOf: - ToStyleSheetTheme ] ]. - elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. - allPossibleStamps := elementsWithStyleSheetTheme collect: [ :each | - PyramidSelectorPossibleStamps new - theme: each lookupTheme; - findAllStampsFor: each ]. - allCommonStamps := allPossibleStamps first. - allPossibleStamps do: [ :each | - allCommonStamps := allCommonStamps & each ]. - ^ allCommonStamps collect: [ :each | self propertyForStamp: each ]. + elementWithStyleSheetTheme := (aElement isAttachedToSceneGraph and: [ + aElement lookupTheme isKindOf: + ToStyleSheetTheme ]) ifTrue: [ aElement ]. + elementWithStyleSheetTheme ifNil: [ ^ { } ]. + allPossibleStamps := PyramidSelectorPossibleStamps new + theme: elementWithStyleSheetTheme lookupTheme; + findAllStampsFor: elementWithStyleSheetTheme. + ^ allPossibleStamps collect: [ :each | self propertyForStamp: each ] ] { #category : #'as yet unclassified' } From d6372d6ab39558ac5c8bcc90e231fb54a86b1b84 Mon Sep 17 00:00:00 2001 From: SullyMLT Date: Tue, 26 Aug 2025 12:01:15 +0200 Subject: [PATCH 4/4] Rename aElement to anElement --- src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st | 4 ++-- src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st b/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st index c3aae02d..bd720b14 100644 --- a/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st +++ b/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st @@ -19,11 +19,11 @@ Class { } { #category : #adding } -PyramidStampManagerPresenter >> addRootsStampAddTreeTable: aElement [ +PyramidStampManagerPresenter >> addRootsStampAddTreeTable: anElement [ | collectionOfStamps | - collectionOfStamps := pyramidPropertiesStrategy propertiesFor: aElement. + collectionOfStamps := pyramidPropertiesStrategy propertiesFor: anElement. ^ collectionOfStamps. ] diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st index e2e30628..4718e20f 100644 --- a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -5,13 +5,13 @@ Class { } { #category : #'as yet unclassified' } -PyramidThemePropertyStrategy >> propertiesFor: aElement [ +PyramidThemePropertyStrategy >> propertiesFor: anElement [ | elementWithStyleSheetTheme allPossibleStamps | - elementWithStyleSheetTheme := (aElement isAttachedToSceneGraph and: [ - aElement lookupTheme isKindOf: - ToStyleSheetTheme ]) ifTrue: [ aElement ]. + elementWithStyleSheetTheme := (anElement isAttachedToSceneGraph and: [ + anElement lookupTheme isKindOf: + ToStyleSheetTheme ]) ifTrue: [ anElement ]. elementWithStyleSheetTheme ifNil: [ ^ { } ]. allPossibleStamps := PyramidSelectorPossibleStamps new theme: elementWithStyleSheetTheme lookupTheme;