mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-03 15:14:35 +00:00
Rename WeakPin -> PinWeak
This commit is contained in:
parent
75671c18e7
commit
cb67e40c32
5 changed files with 27 additions and 27 deletions
|
@ -4,13 +4,13 @@ sixtyfps::include_modules!();
|
|||
|
||||
fn main() {
|
||||
let app = Hello::new();
|
||||
let app_weak = sixtyfps::re_exports::WeakPin::downgrade(app.clone());
|
||||
let app_weak = sixtyfps::re_exports::PinWeak::downgrade(app.clone());
|
||||
app.plus_clicked.set_handler(move |()| {
|
||||
let app = app_weak.upgrade().unwrap();
|
||||
let counter = Hello::field_offsets().counter.apply_pin(app.as_ref());
|
||||
counter.set(counter.get() + 1);
|
||||
});
|
||||
let app_weak = sixtyfps::re_exports::WeakPin::downgrade(app.clone());
|
||||
let app_weak = sixtyfps::re_exports::PinWeak::downgrade(app.clone());
|
||||
app.minus_clicked.set_handler(move |()| {
|
||||
let app = app_weak.upgrade().unwrap();
|
||||
let counter = Hello::field_offsets().counter.apply_pin(app.as_ref());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue