diff --git a/src/GToolkit-Demo-MoldableDevelopment/GtInspectorScripterExamples.class.st b/src/GToolkit-Demo-MoldableDevelopment/GtInspectorScripterExamples.class.st index fdf1d408..1417a434 100644 --- a/src/GToolkit-Demo-MoldableDevelopment/GtInspectorScripterExamples.class.st +++ b/src/GToolkit-Demo-MoldableDevelopment/GtInspectorScripterExamples.class.st @@ -4,6 +4,48 @@ Class { #category : #'GToolkit-Demo-MoldableDevelopment-Examples' } +{ #category : #example } +GtInspectorScripterExamples >> emptyStackMachine [ + + ^ StackMachineV0 new +] + +{ #category : #example } +GtInspectorScripterExamples >> emptyStackMachineV1 [ + + ^ StackMachineV1 new +] + +{ #category : #example } +GtInspectorScripterExamples >> emptyStackMachineV1WithPlaygroundCode [ + + | scripter | + scripter := GtInspectorScripterExamples new + scriptedInspectorOn: self emptyStackMachineV1 + WithPlaygroundText: 'self ! 3. self ! 4.'. + ^ scripter elementWithoutParent +] + +{ #category : #example } +GtInspectorScripterExamples >> emptyStackMachineWithGeneralizedPlaygroundCode [ + + | scripter | + scripter := GtInspectorScripterExamples new + scriptedInspectorOn: self emptyStackMachine + WithPlaygroundText: 'stack addLast: aValue'. + ^ scripter elementWithoutParent +] + +{ #category : #example } +GtInspectorScripterExamples >> emptyStackMachineWithPlaygroundCode [ + + | scripter | + scripter := GtInspectorScripterExamples new + scriptedInspectorOn: self emptyStackMachine + WithPlaygroundText: 'stack addLast: 3'. + ^ scripter elementWithoutParent +] + { #category : #accessing } GtInspectorScripterExamples >> pixelsToMove [ "Number of pixels to raise the playground handle." @@ -53,7 +95,7 @@ GtInspectorScripterExamples >> scriptedInspectorInPagerOn: anObject withPlaygrou ^ scripter ] -{ #category : #accessing } +{ #category : #example } GtInspectorScripterExamples >> scriptedInspectorOn3plus4WithPlayground [ "Illustrates how to script an Inspector with an open playground." @@ -66,7 +108,7 @@ GtInspectorScripterExamples >> scriptedInspectorOn3plus4WithPlayground [ ^ scripter elementWithoutParent ] -{ #category : #accessing } +{ #category : #example } GtInspectorScripterExamples >> scriptedInspectorOn3plus4WithPlaygroundSmalltalkEvaluate [ "Illustrates how to script an Inspector with an open playground." @@ -104,3 +146,16 @@ GtInspectorScripterExamples >> scriptedInspectorOn: anObject WithPlaygroundText: ^ scripter ] + +{ #category : #example } +GtInspectorScripterExamples >> stackMachineV1WithCodeEvaluated [ + + | scripter | + scripter := GtInspectorScripterExamples new + scriptedInspectorInPagerOn: (StackMachineV1 new + ! 3; + ! 4; + yourself) + withPlaygroundTextAndDoit: 'self top'. + ^ scripter elementWithoutParent +] diff --git a/src/GToolkit-Demo-Scripter/PatternScripterExamples.class.st b/src/GToolkit-Demo-Scripter/PatternScripterExamples.class.st index 487c71d8..221f060b 100644 --- a/src/GToolkit-Demo-Scripter/PatternScripterExamples.class.st +++ b/src/GToolkit-Demo-Scripter/PatternScripterExamples.class.st @@ -78,7 +78,7 @@ PatternScripterExamples >> cartoonAddressBookSearchScript [ text: 'u'; play. - ^ scripter "elementWithoutParent" + ^ scripter elementWithoutParent ] { #category : #example } @@ -124,7 +124,7 @@ PatternScripterExamples >> customViewCustomMovesViewScript [ scripter doubleClick label: 'Double-click on the row'; play. - ^ scripter "elementWithoutParent" + ^ scripter elementWithoutParent ] { #category : #example } @@ -150,7 +150,7 @@ PatternScripterExamples >> customViewRawViewScript [ label: 'Open the 6th move'; id: #triangle index: 15; play. - ^ scripter "elementWithoutParent" + ^ scripter elementWithoutParent ] { #category : #example } @@ -230,7 +230,7 @@ PatternScripterExamples >> moldableToolViewCodeScript [ id: #bar index: 2; modifiers: BlKeyModifiers alt; play. - ^ scripter "elementWithoutParent" + ^ scripter elementWithoutParent ] { #category : #example }