-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Micro components #50
Micro components #50
Conversation
src/micro_component.rs
Outdated
pub fn update_view(&self) { | ||
todo!() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as in the event loop. Try to acquire the widgets and the model and then call view. This function could theoretically return a Result
instead of error handling through logs.
- Removed unneeded Option from model and widgets, - implemented `update_view`
Currently only the handler of events is interested in the `data` which makes `data` a `dead_code`. So I've commented it out
- gtk from 0.3 to 0.3.1 - libadwaita from 0.1.0-alpha-5 to 0.1.0-alpha-6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and should be ready to merge. I will write an example for micro components and refine the API if necessary soon.
/// Formats [`MicroComponentError`] for debug format `{:?}` | ||
/// | ||
/// This allows you to print errors without doing `matching` or `if let` statements | ||
impl Debug for MicroComponentError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason to manually implement this? I think using #derive[Debug]
should do the same.
Implementation of #49
It's required to make #46 go forward