Skip to content

Commit

Permalink
[feenkcom/gtoolkit#4136] Added Scripter examples for Custom View
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Nierstrasz committed Nov 3, 2024
1 parent 8ed0033 commit c3da003
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/GToolkit-Demo-Scripter/PatternScripterExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,51 @@ Class {
#category : #'GToolkit-Demo-Scripter-Examples'
}

{ #category : #'as yet unclassified' }
PatternScripterExamples >> customViewCustomMovesView [
"NB: It is not enough to double-click directly on the 6th row.
We have to first click to select it, and then double-click."
<gtExample>
| scripter game |
game := GtLudoRecordingGameExamples new gameShowingAllMoves5.
scripter := BlScripter new.
scripter element: (GtInspector createOn: game) maximized.
scripter click
id: #bar index: 5;
play. "Select the Moves view."
scripter click
id: GtPhlowColumnedListId;
id: #scrollable;
onChildAt: 6;
// GtPhlowCellElement;
@ 1;
play. "Select the 6th move."
scripter doubleClick play. "Doubleclick."
^ scripter "elementWithoutParent"
]

{ #category : #'as yet unclassified' }
PatternScripterExamples >> customViewRawView [
<gtExample>
| scripter game |
scripter := BlScripter new.
game := GtLudoRecordingGameExamples new gameShowingAllMoves3.
scripter element: (GtInspector createOn: game) maximized.
scripter click
id: #bar index: 7;
play. "Select the Raw view."
scripter click
id: #triangle index: 8;
play. "Open the moves slot."
scripter click
id: #triangle index: 9;
play. "Open the array slot."
scripter click
id: #triangle index: 15;
play. "Open the 6th move."
^ scripter "elementWithoutParent"
]

{ #category : #'as yet unclassified' }
PatternScripterExamples >> moldableToolViewCodeScript [
<gtExample>
Expand Down

0 comments on commit c3da003

Please sign in to comment.