switch away from handles to refs that must be upgraded once
This commit is contained in:
@@ -10,15 +10,15 @@ pub mod eventable {
|
||||
f: impl for<'a> WidgetEventFn<State::State, <E::Event as Event>::Data<'a>, WL::Widget>,
|
||||
) -> impl WidgetIdFn<State, WL::Widget> {
|
||||
move |state| {
|
||||
let id = self.handles(state);
|
||||
state.register_event(id.r, event.into_event(), move |ctx| {
|
||||
let id = self.add(state);
|
||||
state.register_event(id, event.into_event(), move |ctx| {
|
||||
f(&mut EventIdCtx {
|
||||
widget: id.r,
|
||||
widget: id,
|
||||
state: ctx.state,
|
||||
data: ctx.data,
|
||||
});
|
||||
});
|
||||
id.h
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user