Coder Social home page Coder Social logo

druid-todo-tutorial's People

Contributors

futurepaul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

druid-todo-tutorial's Issues

missing line

Hello Paul
I am very fond of your tutorial. Right now I have finished chapter 3.
And though rustc gives me the correct hint, I would prefer your tutorial to be complete.
regarding main.rs:
It took me some attempts to figure out where to write the two lines
and second the following line is missing (I put it in line 2)

use crate::data::TodoItem;

Please add this to your doc
Thanks
Michael

Selector widget error

the trait bound `Destination: druid::data::Data` is not satisfied
  --> src\main.rs:45:46
   |
45 |           Scroll::new(ListSelect::build_widget(vec![
   |  ______________________________________________^
46 | |             ("to Sydney", Destination::Sydney),
47 | |             ("to Petaluma", Destination::Petaluma),
48 | |             ("to Tokyo", Destination::Tokyo),
49 | |             ("to Paris", Destination::Paris),
50 | |         ]))
   | |_________^ the trait `druid::data::Data` is not implemented for `Destination`

Fix code injection.

In README.md, on line 389, we have some code injection:

Make sure to declare the new modulepub fn new(todos: Vec<TodoItem>) -> Self {
        Self {
            new_todo: "".into(),
            todos: Vector::from(todos),
        }
    }s:

Very vulnerability!

copy paste error

Hello Paul
Now I am finished and though I yet not fully understand why you did some of the programming, it gives me serious clues how to structurize my own apps.
In chapter 7 you didn't finish the Flex correct.

you wrote:
Flex::row()
.with_child(checkbox)
.with_child(label)
.with_flex_spacer(1.)
.with_child(delete_button)
.controller(TodoItemController
let delete_button = Button::new("Delete").on_click(TodoItem::click_delete);

But the last line should be removed and replaced just by a closing ")"

Thanks for your work!

.disable_if method for Enable\Disable widgets

Hi everyone, i want to use the disable_if method to Enable\Disable my widgets when data.value is true.
I saw https://github.com/linebender/druid/pull/1702/files# pull request but i don't understand how to use the method.
let spinner_section = Flex::column() .with_child(Label::new(LocalizedString::new("Sto cercando gli schemi...")).with_text_color(Color::BLUE).padding(5.0)) .with_child(Spinner::new().with_color(Color::BLUE)) .disabled_if(|data: &mut AppState, _env: &Env| data.processing) .padding(40.0);
On disable_if method gave me an error: type mismatch in closure arguments
expected signature of for<'r, 's> fn(&'r _, &'s Env) -> _

Someone can help me to understand how to use this feature? Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.