Skip to content

Commit c0587e4

Browse files
committed
Improved some comments in ILWidget
1 parent 1de9802 commit c0587e4

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ gst.log
55
iliad.im
66
iliad.log
77
log.log
8+
iliad.pidaproject
89
make_packages.log
910

Core/Buildables/ILWidget.st

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,15 @@ added to the decoration chain with #decorateWith:.'>
234234
]
235235

236236
answer [
237-
"Give the control back to the owner, i.e, the widget which showed me.
237+
"Give the control back to the owner, i.e, the widget which showed the receiver.
238238
Answer self"
239239
<category: 'control flow'>
240240

241241
^self answer: self
242242
]
243243

244244
answer: anAnswer [
245-
"Give the control back to the owner, i.e, the widget which showed me.
245+
"Give the control back to the owner, i.e, the widget which showed the receiver.
246246
Answer <anAnswer>"
247247
<category: 'control flow'>
248248

@@ -255,7 +255,7 @@ added to the decoration chain with #decorateWith:.'>
255255
]
256256

257257
retrieveControl [
258-
"Get the control back to the receiver from any showed widget, and make it answer nil"
258+
"Give the control back to the receiver, and make any showed widget answer nil"
259259
<category: 'control flow'>
260260

261261
self decoratorsDo: [:each |
@@ -265,15 +265,15 @@ added to the decoration chain with #decorateWith:.'>
265265

266266
show: aWidget [
267267
"Show another widget instead of the receiver.
268-
I am also implicitely marked dirty"
268+
The receiver is also implicitely marked dirty"
269269
<category: 'control flow'>
270270

271271
self show: aWidget onAnswer: [:ans | ]
272272
]
273273

274274
show: aWidget onAnswer: aBlock [
275275
"Show another widget instead of the receiver and catch the answer in <aBlock>.
276-
I am also implicitely marked dirty"
276+
The receiver is also implicitely marked dirty"
277277
<category: 'control flow'>
278278

279279
self
@@ -300,16 +300,27 @@ added to the decoration chain with #decorateWith:.'>
300300
decorateWith: answerHandler
301301
]
302302

303-
printJsonOn: aStream [
304-
<category:'printing'>
305-
self build printJsonOn: aStream
303+
addDependentWidget: aWidget [
304+
"Add <aWidget> to my dependent widgets.
305+
Each dependent widget will be rebuilt on AJAX requests whenever
306+
I am rebuilt"
307+
<category: 'control flow'>
308+
309+
(dependentWidgets includes: aWidget) ifFalse: [
310+
dependentWidgets add: aWidget]
311+
]
312+
313+
removeDependentWidget: aWidget [
314+
<category: 'control flow'>
315+
(dependentWidgets includes: aWidget) ifTrue: [
316+
dependentWidgets remove: aWidget]
306317
]
307318

308319
markDirty [
309-
"Mark the widget as 'dirty', ie,
310-
The widget will be rebuilt on Ajax requests.
311-
You do not need to mark subwidgets as dirty.
312-
They will be automatically rebuilt too"
320+
"Mark the receiver as 'dirty',
321+
so the widget will be rebuilt on Ajax requests.
322+
You do not need to mark subwidgets as dirty,
323+
they will be rebuilt together with the receiver"
313324
<category: 'states'>
314325

315326
self owner
@@ -325,20 +336,9 @@ added to the decoration chain with #decorateWith:.'>
325336
^self session addToDirtyWidgets: self
326337
]
327338

328-
addDependentWidget: aWidget [
329-
"Add <aWidget> to my dependent widgets.
330-
Each dependent widget will be rebuilt on AJAX requests whenever
331-
I am rebuilt"
332-
<category: 'control flow'>
333-
334-
(dependentWidgets includes: aWidget) ifFalse: [
335-
dependentWidgets add: aWidget]
336-
]
337-
338-
removeDependentWidget: aWidget [
339-
<category: 'control flow'>
340-
(dependentWidgets includes: aWidget) ifTrue: [
341-
dependentWidgets remove: aWidget]
339+
printJsonOn: aStream [
340+
<category:'printing'>
341+
self build printJsonOn: aStream
342342
]
343343

344344
newRootElement [
@@ -359,4 +359,3 @@ added to the decoration chain with #decorateWith:.'>
359359
aHead add: e]]]
360360
]
361361
]
362-

0 commit comments

Comments
 (0)