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

v1 - Example.cs does not work #3579

Closed
tig opened this issue Jul 3, 2024 Discussed in #3578 · 5 comments · Fixed by #3580
Closed

v1 - Example.cs does not work #3579

tig opened this issue Jul 3, 2024 Discussed in #3578 · 5 comments · Fixed by #3580
Assignees
Labels
bug v1 For Issues & PRs targetting v1.x
Milestone

Comments

@tig
Copy link
Collaborator

tig commented Jul 3, 2024

Discussed in #3578

Originally posted by hsnprojects July 2, 2024
Example.cs app runs, but after logging in it cannot retrieve usernameText field because Application.Top is null.

@tig tig added bug v1 For Issues & PRs targetting v1.x labels Jul 3, 2024
@tig tig self-assigned this Jul 3, 2024
tig added a commit that referenced this issue Jul 3, 2024
Fixes #3579: V1 Example.cs is broken
@tig tig closed this as completed in #3580 Jul 3, 2024
@BDisp
Copy link
Collaborator

BDisp commented Jul 3, 2024

@tig something went wrong here. In the v2_develop the code isn't the same as your pull request.

using System;
using Terminal.Gui;
var app = Application.Run<ExampleWindow> ();
Console.WriteLine ($"Username: {app.UserNameText.Text}");
app.Dispose ();
// Before the application exits, reset Terminal.Gui for clean shutdown
Application.Shutdown ();

@tig
Copy link
Collaborator Author

tig commented Jul 4, 2024

I only updated develop. It should not have impacted v2.

@BDisp
Copy link
Collaborator

BDisp commented Jul 4, 2024

I only updated develop. It should not have impacted v2.

Ops sorry I thought it was on v2. On v2 it doesn't output to the screen because the write is called before shutdown.

@tig
Copy link
Collaborator Author

tig commented Jul 5, 2024

I only updated develop. It should not have impacted v2.

Ops sorry I thought it was on v2. On v2 it doesn't output to the screen because the write is called before shutdown.

Yeah, we should fix that.

@BDisp
Copy link
Collaborator

BDisp commented Jul 5, 2024

Yeah, we should fix that.

Done it here.

@tig tig added this to the v1.17.1 milestone Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v1 For Issues & PRs targetting v1.x
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants