Skip to content

Commit c7e84bf

Browse files
authored
Update README.md
1 parent ed54e28 commit c7e84bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Observable<ActionEvent> hotKeyPresses =
308308
myEventModel.getRefreshRequests().add(hotKeyPresses);
309309

310310
//subscribe to refresh events
311-
myEventModel.getRefreshRequests().subscribe(ae -> refresh());
311+
myEventModel.getRefreshRequests().toObservable().subscribe(ae -> refresh());
312312
```
313313

314314
The `add()` method on a `CompositeObservable` returns a subscription which you can `unsubscribe()`, and this will affect all existing downstream Subscribers. For UI development, this is good because there is no sensitivity to the order of adding Observables and subscribing.

0 commit comments

Comments
 (0)