Skip to content

Commit 01eaae9

Browse files
committed
Update README.md
1 parent 1f1762f commit 01eaae9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,12 @@ Label incrementLabel = new Label("");
172172

173173
Observable<ActionEvent> bttnEvents =
174174
JavaFxObservable.fromNodeEvents(incrementBttn, ActionEvent.ACTION);
175-
176-
Binding<String> binding = JavaFxSubscriber.toBinding(bttnEvents.map(e -> 1).scan(0,(x, y) -> x + y)
177-
.map(Object::toString));
175+
176+
Observable<String> accumulations = bttnEvents.map(e -> 1)
177+
.scan(0,(x, y) -> x + y)
178+
.map(Object::toString);
179+
180+
Binding<String> binding = JavaFxSubscriber.toBinding(accumulations);
178181

179182
incrementLabel.textProperty().bind(binding);
180183

0 commit comments

Comments
 (0)