8000 Added <return:...> pragma to examples. · feenkcom/gtoolkit-world@0bf5208 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 0bf5208

Browse files
committed
Added <return:...> pragma to examples.
1 parent 7b4b29b commit 0bf5208

17 files changed

+365
-245
lines changed

src/GToolkit-Docs/GtCreateStandaloneAppHowToGuide.class.st

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ GtCreateStandaloneAppHowToGuide >> disableGtWorldShutdownHandler [
2626
{ #category : #examples }
2727
GtCreateStandaloneAppHowToGuide >> helloWorldScene [
2828
<gtExample>
29+
<return: #BrVerticalPane>
2930
| aContainer |
30-
3131
aContainer := BrVerticalPane new
32-
matchParent;
33-
alignCenter.
34-
35-
aContainer addChild: (BrLabel new
36-
aptitude: (BrGlamorousLabelAptitude new fontSize: 30);
37-
text: 'Hello world!').
38-
32+
matchParent;
33+
alignCenter.
34+
35+
aContainer
36+
addChild: (BrLabel new
37+
aptitude: (BrGlamorousLabelAptitude new fontSize: 30);
38+
text: 'Hello world!').
39+
3940
^ aContainer
4041
]
4142

src/GToolkit-Docs/GtWorkWithQueriesHowToGuide.class.st

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,56 +141,56 @@ Class {
141141
{ #category : #'as yet unclassified' }
142142
GtWorkWithQueriesHowToGuide >> exampleMethodsFromGToolkitPackages [
143143
<gtExample>
144-
145-
^ #gtExample gtPragmas select: [ :method |
146-
method package name beginsWith: 'GToolkit'].
144+
<return: #GtSearchIntersectionFilter>
145+
^ #gtExample gtPragmas
146+
select: [ :method | method package name beginsWith: 'GToolkit' ]
147147
]
148148

149149
{ #category : #accessing }
150150
GtWorkWithQueriesHowToGuide >> searchAllFilters [
151151
<gtExample>
152-
^ GtSearchFilter allSubclasses
153-
reject: [ :each | each gtReferences size = 0 ].
152+
<return: #OrderedCollection>
153+
^ GtSearchFilter allSubclasses reject: [ :each | each gtReferences size = 0 ]
154154
]
155155

156156
{ #category : #'as yet unclassified' }
157157
GtWorkWithQueriesHowToGuide >> searchFiltersDiagram [
158158
<gtExample>
159-
160-
^ GtSearchFilter.
159+
<return: #'GtSearchFilter class'>
160+
^ GtSearchFilter
161161
]
162162

163163
{ #category : #'as yet unclassified' }
164164
GtWorkWithQueriesHowToGuide >> searchForGtExampleReferences [
165165
<gtExample>
166-
167-
^ #gtExample gtReferences.
166+
<return: #GtCachedSearchReferencesFilter>
167+
^ #gtExample gtReferences
168168
]
169169

170170
{ #category : #'as yet unclassified' }
171171
GtWorkWithQueriesHowToGuide >> searchForGtViewPragmaMethods [
172172
<gtExample>
173-
174-
^ #gtView gtPragmas.
173+
<return: #GtSearchPragmasFilter>
174+
^ #gtView gtPragmas
175175
]
176176

177177
{ #category : #'as yet unclassified' }
178178
GtWorkWithQueriesHowToGuide >> searchForGtViewTreeAndColumnedTreeMethods [
179179
<gtExample>
180-
181-
^ #gtView gtPragmas & (#tree gtReferences | #columnedTree gtReferences).
180+
<return: #GtSearchIntersectionFilter>
181+
^ #gtView gtPragmas & (#tree gtReferences | #columnedTree gtReferences)
182182
]
183183

184184
{ #category : #'as yet unclassified' }
185185
GtWorkWithQueriesHowToGuide >> searchForGtViewTreeMethods [
186186
<gtExample>
187-
188-
^ #gtView gtPragmas & #tree gtReferences.
187+
<return: #GtSearchIntersectionFilter>
188+
^ #gtView gtPragmas & #tree gtReferences
189189
]
190190

191191
{ #category : #'as yet unclassified' }
192192
GtWorkWithQueriesHowToGuide >> searchInCertainPackage [
193193
<gtExample>
194-
195-
^ #todo gtReferences & 'Bloc' gtPackageMatches.
194+
<return: #GtSearchIntersectionFilter>
195+
^ #todo gtReferences & 'Bloc' gtPackageMatches
196196
]

src/GToolkit-Profiler/GtSamplingProfilerExamples.class.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Class {
77
{ #category : #accessing }
88
GtSamplingProfilerExamples >> createSpyAllOn [
99
<gtExample>
10+
<return: #AsyncFuturePromise>
1011
| tally |
1112
tally := GtSamplingProfiler spyAllProcessesFor: 2 seconds.
1213
^ tally

src/GToolkit-World/BrKeyboardFocusChangeAptitudeExamples.class.st

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Class {
77
{ #category : #examples }
88
BrKeyboardFocusChangeAptitudeExamples >> fortyNineButtonsWithDifferentParents [
99
<gtExample>
10+
<return: #BrHorizontalPane>
1011
| grid |
1112
grid := BrHorizontalPane new matchParent
1213
addChildren: (7
@@ -34,6 +35,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyNineButtonsWithDifferentParents [
3435
{ #category : #examples }
3536
BrKeyboardFocusChangeAptitudeExamples >> fortyNineButtonsWithDifferentParentsFocusOnLast [
3637
<gtExample>
38+
<return: #BlScripter>
3739
| aScripter grid |
3840
grid := self fortyNineButtonsWithDifferentParents.
3941
aScripter := BlScripter new.
@@ -60,6 +62,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyNineButtonsWithDifferentParentsFoc
6062
{ #category : #examples }
6163
BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtons [
6264
<gtExample>
65+
<return: #BrHorizontalGrid>
6366
| grid |
6467
grid := BrHorizontalGrid new
6568
columnCount: 7;
@@ -82,6 +85,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtons [
8285
{ #category : #examples }
8386
BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusBackOnFirst [
8487
<gtExample>
88+
<return: #BlScripter>
8589
| aScripter |
8690
aScripter := self fortyTwoButtonsFocusOnLast.
8791
5
@@ -112,6 +116,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusBackOnFirst [
112116
{ #category : #examples }
113117
BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusBackOnFirstWithShiftTab [
114118
<gtExample>
119+
<return: #BlScripter>
115120
| aScripter |
116121
aScripter := self fortyTwoButtonsFocusOnLastWithTab.
117122

@@ -121,7 +126,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusBackOnFirstWithShif
121126
key: BlKeyboardKey tab;
122127
modifiers: BlKeyModifiers shift;
123128
play ].
124-
129+
125130
aScripter assert
126131
label: 'Assert First button has focus';
127132
satisfies: [ :aGrid |
@@ -137,14 +142,13 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusBackOnFirstWithShif
137142
{ #category : #examples }
138143
BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusOnFirstWithTabWrapAround [
139144
<gtExample>
140-
| aScripter |
141-
aScripter := self fortyTwoButtonsFocusOnLastWithTab.
142-
143-
"Pressing tab one more time will change focus from the last to the first element"
145+
<return: #BlScripter>
146+
| aScripter |
147+
aScripter := self fortyTwoButtonsFocusOnLastWithTab. "Pressing tab one more time will change focus from the last to the first element"
144148
aScripter keyPress
145-
label: 'Press tab key';
146-
key: BlKeyboardKey tab;
147-
play .
149+
label: 'Press tab key';
150+
key: BlKeyboardKey tab;
151+
play.
148152
aScripter assert
149153
label: 'Assert First button has focus.';
150154
satisfies: [ :aGrid |
@@ -159,6 +163,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusOnFirstWithTabWrapA
159163
{ #category : #examples }
160164
BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusOnLast [
161165
<gtExample>
166+
<return: #BlScripter>
162167
| aScripter grid |
163168
grid := self fortyTwoButtons.
164169
aScripter := BlScripter new.
@@ -191,6 +196,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusOnLast [
191196
{ #category : #examples }
192197
BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusOnLastWithTab [
193198
<gtExample>
199+
<return: #BlScripter>
194200
| aScripter grid |
195201
grid := self fortyTwoButtons.
196202
aScripter := BlScripter new.
@@ -214,6 +220,7 @@ BrKeyboardFocusChangeAptitudeExamples >> fortyTwoButtonsFocusOnLastWithTab [
214220
{ #category : #examples }
215221
BrKeyboardFocusChangeAptitudeExamples >> twoButtons [
216222< B93C /code>
<gtExample>
223+
<return: #BrHorizontalGrid>
217224
| grid |
218225
grid := BrHorizontalGrid new
219226
columnCount: 7;
@@ -233,6 +240,7 @@ BrKeyboardFocusChangeAptitudeExamples >> twoButtons [
233240
{ #category : #examples }
234241
BrKeyboardFocusChangeAptitudeExamples >> twoButtonsChangeFocus [
235242
<gtExample>
243+
<return: #BlScripter>
236244
| aScripter grid |
237245
grid := self twoButtons.
238246
aScripter := BlScripter new.
@@ -254,6 +262,7 @@ BrKeyboardFocusChangeAptitudeExamples >> twoButtonsChangeFocus [
254262
{ #category : #examples }
255263
BrKeyboardFocusChangeAptitudeExamples >> twoButtonsChangeFocusAndPressEnter [
256264
<gtExample>
265+
<return: #BlScripter>
257266
| aCollection aScripter |
258267
aCollection := OrderedCollection new.
259268
aScripter := self twoButtonsChangeFocus.
@@ -278,6 +287,7 @@ BrKeyboardFocusChangeAptitudeExamples >> twoButtonsChangeFocusAndPressEnter [
278287
{ #category : #examples }
279288
BrKeyboardFocusChangeAptitudeExamples >> twoButtonsChangeFocusPastLastButton [
280289
<gtExample>
290+
<return: #BlScripter>
281291
| aScripter grid |
282292
grid := self twoButtons.
283293
aScripter := BlScripter new.
@@ -300,6 +310,7 @@ BrKeyboardFocusChangeAptitudeExamples >> twoButtonsChangeFocusPastLastButton [
300310
{ #category : #examples }
301311
BrKeyboardFocusChangeAptitudeExamples >> twoButtonsWithDifferentParents [
302312
<gtExample>
313+
<return: #BrHorizontalGrid>
303314
| grid |
304315
grid := BrHorizontalGrid new
305316
columnCount: 7;
@@ -327,6 +338,7 @@ BrKeyboardFocusChangeAptitudeExamples >> twoButtonsWithDifferentParents [
327338
{ #category : #examples }
328339
BrKeyboardFocusChangeAptitudeExamples >> twoButtonsWithDifferentParentsChangeFocus [
329340
<gtExample>
341+
<return: #BlScripter>
330342
| aScripter grid |
331343
grid := self twoButtonsWithDifferentParents.
332344
aScripter := BlScripter new.

src/GToolkit-World/GtHomeCardByScripterExamples.class.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Class {
99
{ #category : #examples }
1010
GtHomeCardByScripterExamples >> displayTooltip [
1111
<gtExample>
12+
<return: #BlScripter>
1213
| aScripter aCard aLoggerStep |
1314
aScripter := self
1415
scripterWithElement: [ aCard := GtHomeCardExamples new jobCard.

src/GToolkit-World/GtHomeCardExamples.class.st

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ Class {
77
{ #category : #example }
88
GtHomeCardExamples >> errorCard [
99
<gtExample>
10+
<return: #GtHomeErrorCard>
1011
^ GtHomeCard errorCard
11-
targetError:
12-
(Error new messageText: 'An error occurred!')
12+
targetError: (Error new messageText: 'An error occurred!')
1313
]
1414

1515
{ #category : #example }
1616
GtHomeCardExamples >> gtBookCard [
1717
<gtExample>
18+
<return: #GtHomePageCard>
1819
^ GtHomeCard page
1920
title: 'Glamorous Toolkit Book';
2021
description: 'Read the Glamorous Toolkit book';
@@ -32,6 +33,7 @@ GtHomeCardExamples >> gtDemosDbName [
3233
{ #category : #example }
3334
GtHomeCardExamples >> gtTourCard [
3435
<gtExample>
36+
<return: #GtJobHomeCard>
3537
^ GtHomeCard job
3638
title: 'GtTour';
3739
description: 'Open the GtTour slideshow';
@@ -45,6 +47,7 @@ GtHomeCardExamples >> jobCard [
4547
"If you click multiple times on the button, this will trigger a warning that a job is still running."
4648

4749
<gtExample>
50+
<return: #GtJobHomeCard>
4851
^ GtHomeCard job
4952
title: 'Test job card';
5053
description: 'Demo running a job from a card';
@@ -100,6 +103,7 @@ GtHomeCardExamples >> primaryDbTocCard [
100103
{ #category : #accessing }
101104
GtHomeCardExamples >> registry [
102105
<gtExample>
106+
<return: #LeLogicalDatabase>
103107
^ LeDatabasesRegistry uniqueInstance defaultLogicalDatabase
104108
]
105109

src/GToolkit-World/GtHomeClassCommentCardElementExamples.class.st

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Class {
1111
{ #category : #'examples - basic' }
1212
GtHomeClassCommentCardElementExamples >> basicElement [
1313
<gtExample>
14+
<return: #GtHomeClassCommentCardElement>
1415
| anElement |
1516
anElement := GtHomeClassCommentCardElement new.
1617
self assert: anElement documentClass isNil.
@@ -22,31 +23,35 @@ GtHomeClassCommentCardElementExamples >> basicElement [
2223
{ #category : #accessing }
2324
GtHomeClassCommentCardElementExamples >> elementWithClassWithComment [
2425
<gtExample>
26+
<return: #GtHomeClassCommentCardElement>
2527
| anElement |
2628
anElement := self basicElement.
2729
anElement documentClass: anElement class.
2830

2931
self assert: anElement titleElement text isNotEmpty.
3032
self assert: anElement descriptionElement text isNotEmpty.
31-
32-
self
33+
34+
self
3335
assert: anElement titleElement text asString
3436
equals: anElement class comment lines first.
3537

36-
self
38+
self
3739
assert: anElement descriptionElement text asString
3840
equals: anElement description.
39-
41+
4042
^ anElement
4143
]
4244

4345
{ #category : #'examples - element' }
4446
GtHomeClassCommentCardElementExamples >> elementWithClassWithoutComment [
4547
<gtExample>
48+
<return: #GtHomeClassCommentCardElement>
4649
| anElement |
4750
anElement := self basicElement.
4851
anElement documentClass: GtHomeClassWithoutClassComment.
49-
self assert: anElement titleElement text asString equals: GtHomeClassWithoutClassComment name.
52+
self
53+
assert: anElement titleElement text asString
54+
equals: GtHomeClassWithoutClassComment name.
5055
self assert: anElement descriptionElement text isEmpty.
5156
^ anElement
5257
]

0 commit comments

Comments
 (0)
0