Skip to content

Commit 677364e

Browse files
committed
examples: fix grammer in README
1 parent 6f90794 commit 677364e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/virtual_methods/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Example for how to create a base widget which exposes virtual methods that other widgets can override.
44
In this case, a `BaseButton` class is defined which is a gtk::Button with two additional methods:
55

6-
* `sync_method`: Synchonous method that updates the button label to `BaseButton sync`, or `BaseButton sync {}`
7-
where {} is replaced with the `extra_text` parameter, if it's `Some`. This demos how arguments
6+
* `sync_method`: Synchronous method that updates the button label to `BaseButton sync`, or `BaseButton sync {}`
7+
where {} is replaced with the `extra_text` parameter, if it's `Some`. This showcases how arguments
88
can be added to virtual methods. The `Option<String>` has to be boxed to be FFI-safe.
9-
* `async_method` `Asynchronous method that updates the button label to `BaseButton async`
9+
* `async_method`: Asynchronous method that updates the button label to `BaseButton async`
1010

1111
`DerivedButton` overrides the two methods. During construction `sync_method` is called in
1212
`BaseButton` which will set the label to `BaseButton sync` for `BaseButton` and to
13-
`DerivedButton sync` for `DerivedButton`. In the `VirtualMethodsWindow` `connect_clicked` is
14-
called on both buttons and `async_method` is called on both of them and updates their
15-
label accordingly when clicking the button.
13+
`DerivedButton sync` for `DerivedButton`. In the `VirtualMethodsWindow`, `connect_clicked` is
14+
called on both buttons. Each handler for `::clicked` will invoke the respective `async_method`.
15+
This updates the button's label accordingly when clicking it.

0 commit comments

Comments
 (0)