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

readme out of date #2384

Closed
2 tasks done
n1ght-hunter opened this issue Apr 13, 2024 · 6 comments
Closed
2 tasks done

readme out of date #2384

n1ght-hunter opened this issue Apr 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@n1ght-hunter
Copy link
Contributor

n1ght-hunter commented Apr 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

the readmes are out of date
version is wrong
https://github.com/iced-rs/iced/blob/ee105e3bee1bc676dcf3324693984ccda8e4e733/core/README.md

What is the expected behavior?

NA

Version

master

Operating System

Windows

Do you have any log output?

No response

@ccpwcn
Copy link

ccpwcn commented May 27, 2024

When I saw #2346, I thought the problem was fixed. So...

I'm imported iced 0.12.1, copied code from https://github.com/iced-rs/iced/blob/master/examples/counter/src/main.rs
It really sucks, The bug still exists.
image

//隐藏Windows上的控制台窗口
#![windows_subsystem = "windows"]

use iced::widget::{button, column, text, Column};
use iced::Alignment;

pub fn main() -> iced::Result {
    iced::run("A cool counter", Counter::update, Counter::view)
}

#[derive(Default)]
struct Counter {
    value: i64,
}

#[derive(Debug, Clone, Copy)]
enum Message {
    Increment,
    Decrement,
}

impl Counter {
    fn update(&mut self, message: Message) {
        match message {
            Message::Increment => {
                self.value += 1;
            }
            Message::Decrement => {
                self.value -= 1;
            }
        }
    }

    fn view(&self) -> Column<Message> {
        column![
            button("Increment").on_press(Message::Increment),
            text(self.value).size(50),
            button("Decrement").on_press(Message::Decrement)
        ]
        .padding(20)
        .align_items(Alignment::Center)
    }
}

cargo run
image

@ccpwcn
Copy link

ccpwcn commented May 27, 2024

iced = "0.12" doesn't work either.

@ccpwcn
Copy link

ccpwcn commented May 27, 2024

iced = "0.12.0" doesn't work either.
iced = "0.10.0" doesn't work either.
iced = "0.0.0" doesn't work either.

All of them, cannot find the iced::run function. But I saw this function in 0.13.0-dev.

@hecrj
Copy link
Member

hecrj commented May 27, 2024

image

@hecrj hecrj closed this as completed May 27, 2024
@alex-ds13
Copy link
Contributor

image

Actually this issue is related to the iced_core README file that still tells to use version 0.9 even on master branch.

The comments from @ccpwcn are unrelated to this issue itself. Was wrongfully directed here from issue #2346 which is actually the problem they're facing. I've already responded there.

@alex-ds13
Copy link
Contributor

The same thing happens on the iced_wgpu README.

But since I don't think there is many people using the iced_core or iced_wgpu crates directly I don't think this is that much of an issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants