using correct model (transmitting just the first selected, not all the array)
MODIFY
src/PharoLauncher-Spec2/PhLImageCreationPresenter.class.st
src/PharoLauncher-Spec2/PhLImageCreationPresenter.class.st
@@ -163,8 +163,7 @@ PhLImageCreationPresenter >> initializePresenters [
{ #category : #initialization }
PhLImageCreationPresenter >> modelChanged [
-'OK' crTrace.
-self template crTrace.
+
self template ifNil: [ ^ self ].
self template isTemplate
ifTrue: [ self enable.
@@ -210,7 +209,5 @@ PhLImageCreationPresenter >> showNameOk [
PhLImageCreationPresenter >> template [
"Multiple selection is allowed in templates pane => we get a list of templates"
- ^ self model isEmptyOrNil
- ifTrue: [ nil ]
- ifFalse: [ self model first ]
+ ^ self model
]

MODIFY
src/PharoLauncher-Spec2/PhLTemplatesPresenter.class.st
src/PharoLauncher-Spec2/PhLTemplatesPresenter.class.st
@@ -102,9 +102,7 @@ PhLTemplatesPresenter >> buildTemplateTable [
whenRootsChangedDo: [ :roots |
templateTable lazilyComputeChildren: (roots anySatisfy: #shouldComputeChildrenLazily) ];
whenSelectionChangedDo: [ :selection |
- selection isEmpty
- ifTrue: [ descriptionPanel disable ]
- ifFalse: [ descriptionPanel enable ] ]
+ descriptionPanel enabled: selection isEmpty not ]
yourself
]
@@ -118,7 +116,13 @@ PhLTemplatesPresenter >> connectPresenters [
group
ifNil: [ #() ]
ifNotNil: [ group children ] ].
- templateTable transmitTo: descriptionPanel.
+
+ templateTable
+ transmitTo: descriptionPanel
+ transform: [ :selectionArray |
+ selectionArray
+ ifNotEmpty: [ selectionArray last ]
+ ifEmpty: [ nil ] ].
]
{ #category : #accessing }

using correct model (transmitting just the first selected, not all the array)