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

All of the examples are missing #3512

Closed
aloucks opened this issue Feb 23, 2024 · 4 comments
Closed

All of the examples are missing #3512

aloucks opened this issue Feb 23, 2024 · 4 comments
Labels
F - question There's no such thing as a stupid one

Comments

@aloucks
Copy link
Contributor

aloucks commented Feb 23, 2024

As stated all of the examples are gone. There's one mega example, but it's less helpful when trying to figure out a specific concept.

@madsmtm madsmtm added the F - question There's no such thing as a stupid one label Feb 23, 2024
@madsmtm
Copy link
Member

madsmtm commented Feb 23, 2024

Yeah, we merged them in #3447, since we thought it important to give a fuller example of what a real application might look like, and a lot of the Winit developers use the examples for testing that things still work. What specific concept are you struggling with? Maybe we should re-add a basic "hello world" example too?

@kchibisov
Copy link
Member

Examples are structured in a way that they show different aspects. As you can see, window is not a single example, but window shows the most common input/method calling related stuff, because it's not hard to grasp that and it's just all the same, just different method names, etc.

Something that requires separate examples should be in a separate example, like e.g. xembed, pump_events, child_window, on_demand, etc. Everything which is in window.rs example is related to window methods and input, there's nothing special.

Besides most old examples were dead broken and showing bad patterns. If you struggle with certain specifics around the window I'd rather improve docs.

@aloucks
Copy link
Contributor Author

aloucks commented Feb 23, 2024

It's more that they offered an index for features and how to solve specific problems. Now the end users have to go through that whole mega example to find the thing they are looking for. Reading and understanding 1000 lines of unfamiliar code is much more involved than 50-100 lines of highly a specific example. Having an index of small examples is much easier from a user perspective.

@kchibisov
Copy link
Member

I still don't understand, you go and read methods on the Window itself, because that's what most of them did and what got removed. Examples on how to use completely different things like pump_events, child_windows are still there.

Like if the struggle is with search within a file I'm not really sure how to help with that. In general really small examples should go into the method/event docs, since that's where they should be.

The example won't change anyway, since it's the only way to have actually useful bug reports, since you can test with that example pretty much everything relatively easy and compare.

@madsmtm madsmtm mentioned this issue Mar 1, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F - question There's no such thing as a stupid one
Development

No branches or pull requests

3 participants