Skip to content

Commit 11928eb

Browse files
committed
fixing index
1 parent d9138af commit 11928eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Chapters/04-ASimpleTodoApplication/ASimpleTodoApplication.pillar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ h1 {
437437

438438
We just saw how one component can call another and that the other component will appear in place of the one calling it. How do we give back control to the caller or return a result? The method ==answer:== performs this task. It takes an object that we want to return as a parameter.
439439

440-
Let's demonstrate how to use ${index:WAComponent!answer:}$ ==answer:==. We will add two buttons to the interface of the ==ToDoItemView==: one for cancelling the edit and one to return the modified item. Note that in one case we use a normal ${index:WARenderCanvas!submitButton}$ ==submitButton==, and in the other case we use ${index:WARenderCanvas!cancelButton}$ ==cancelButton==.
440+
Let's demonstrate how to use ==answer:==. We will add two buttons to the interface of the ==ToDoItemView==: one for cancelling the edit and one to return the modified item. Note that in one case we use a normal ==submitButton==, and in the other case we use ==cancelButton==.
441441

442442

443443
@@note Pay attention since the cancel button ''looks'' exactly the same as a submit button, but it avoids processing the input callbacks of the form that would modify our model. This means we don't need to copy the model as we did in *ref:/book/components/calling/answer*.

Chapters/11-Sudoko/sudoko.pillar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ MLSudoku >> verifyPossibility: anInteger for: aCell
354354
ifFalse: [ Error signal ]
355355
]]]
356356

357-
In fact when you pressed the ''Back'' button, the Sudoku UI was refreshed but its model was still holding the old values. What we need to do is to indicate to Seaside that when we press the ''Back'' button the state of the model should be kept in sync and rollback to the corresponding older version. We do so by defining the method ${index:WAComponent!states}$ ==states== which returns the elements that should be kept in sync.
357+
In fact when you pressed the ''Back'' button, the Sudoku UI was refreshed but its model was still holding the old values. What we need to do is to indicate to Seaside that when we press the ''Back'' button the state of the model should be kept in sync and rollback to the corresponding older version. We do so by defining the method ==states== which returns the elements that should be kept in sync.
358358

359359
[[[
360360
WebSudoku >> states

0 commit comments

Comments
 (0)