Skip to content
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

Example provided by the book does not work. #1637

Closed
TDecking opened this issue Mar 6, 2021 · 3 comments
Closed

Example provided by the book does not work. #1637

TDecking opened this issue Mar 6, 2021 · 3 comments

Comments

@TDecking
Copy link

TDecking commented Mar 6, 2021

Hello,

In the "Get started with druid" page in the book, the line

    AppLauncher::with_window(WindowDesc::new(build_ui)).launch(())?;

inside the example currently throws an error, as WindowDesc::new() requires a Widget not a function returning a Widget.

Changing the line to

    AppLauncher::with_window(WindowDesc::new(build_ui())).launch(())?;

fixes things.

@memoryruins
Copy link

Which version of druid are you using? I think the book tracks the stable release. The first example should work on the current stable druid 0.7 while the second example works on master.

@TDecking
Copy link
Author

TDecking commented Mar 6, 2021

Currently using the master branch.

This ticket might just be a false alarm, due to me not following the instruction to the letter.

@cmyr
Copy link
Member

cmyr commented Mar 6, 2021

@memoryruins has it right, the readme works for the version on crates.io, but the latest version has some changes; we'll update the readme when we do the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants