Skip to content

Commit a8da369

Browse files
authored
Merge pull request #288 from gtk-rs/bilelmoussaoui-patch-1
2022-10-18-new-release: Chain up on constructed
2 parents 8852261 + 1b00bfc commit a8da369

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

_posts/2022-10-18-new-release.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ In most contexts the object itself was not actually needed, so this also simplif
153153
```rust
154154
impl ObjectImpl for MyObject {
155155
fn constructed(&self) {
156+
self.parent_constructed();
156157
let obj = self.obj();
157158
obj.do_something();
158159
}
@@ -166,6 +167,7 @@ Additionally, to make it easy to pass around the implementation struct into e.g.
166167
```rust
167168
impl ObjectImpl for MyObject {
168169
fn constructed(&self) {
170+
self.parent_constructed();
169171
// for a strong reference
170172
self.button.connect_clicked(glib::clone!(@to-owned self as imp => move |button| {
171173
imp.do_something();

0 commit comments

Comments
 (0)