Skip to content

Commit

Permalink
Merge pull request #338 from seandenigris/enh_gt-form-memento-inspect
Browse files Browse the repository at this point in the history
[Enh]: GT Form - Add "Inspect Memento" Button
  • Loading branch information
seandenigris authored Oct 11, 2023
2 parents b24afda + a022e0b commit ae35667
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion source/Magritte-GToolkit/Object.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,19 @@ Object >> maGtFormFor: aView [
title: 'Magritte';
priority: 50;
stencil: [ (description elementBuilderFor: self) addButtons; element ];
actionUpdateButton
actionButtonIcon: BrGlamorousVectorIcons inspect
label: 'Memento'
tooltip: 'Inspect Memento'
action: [ :aButton :aTab |
aTab viewContentElement
allChildrenBreadthFirstDetect: [ :anElement |
anElement userData includesKey:
#magrittePresenter ]
ifFound: [ :anElement |
| memento |
memento := (anElement userData at: #magrittePresenter) memento.
aButton phlow spawnObject: memento ] ];
actionUpdateButton.
]

{ #category : #'*Magritte-GToolkit' }
Expand Down

0 comments on commit ae35667

Please sign in to comment.