mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:47:36 +00:00
Userland: Use non-fallible EventReceiver::add()
where possible
This commit is contained in:
parent
707ca984bd
commit
b4e134cb52
54 changed files with 934 additions and 934 deletions
|
@ -24,8 +24,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
main_widget->set_layout<GUI::VerticalBoxLayout>(16);
|
||||
|
||||
auto button = TRY(main_widget->try_add<GUI::Button>("Click me!"_string));
|
||||
button->on_click = [&](auto) {
|
||||
auto& button = main_widget->add<GUI::Button>("Click me!"_string);
|
||||
button.on_click = [&](auto) {
|
||||
GUI::MessageBox::show(window, "Hello friends!"sv, ":^)"sv);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue