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
Run 3rd party program #70
Comments
Hi, Wouldn't it be better to pipe the output of out = ui.NewTextView().SetChangedFunc(func() { app.Draw() })
// ...
flex = ui.NewFlex().SetDirection(ui.FlexRow).
AddItem(header, 5, 1, false).
AddItem(cmdl, 1, 1, false).
AddItem(stat, 0, 1, false).
AddItem(out, 0, 4, true)
// ...
cmd := exec.Command("less", "/etc/sysctl.conf")
cmd.Stdout = out
err := cmd.Run() This way, you don't need to leave the application. Let me know if this works for you. |
It may works with pager, but with more complex programs like psql (postgresql interactive terminal) or vi it will not work. Maybe it's possible to realize it as it done in C ncurses with endwin() and refresh() calls? |
Yep, I've done it with app.Stop() and wrapping app.SetRoot() into infinte loop with additional
|
Interesting. I wasn't sure if this was going to work. But it's good that you were able to make it work. You probably won't even need to call If I had given you a dedicated function for this purpose (e.g. something like |
Of course, It would be great and this function will be convenient for me. |
Please have a look at There appears to be a bug in |
Thanks a lot! |
Reopening this as a reminder to switch to the new |
b2dec96 implements |
I'm pretty sure that bug is fixed now. Please retest and let me know -- the only reason it's still open is for feedback. |
It works! Thanks! |
Hi,
I'm trying to run 3rd party program such as "less", "vi", "psql" but when 3rd party program is finished I can't safely return to the main UI mode. When it's finished, I've got different artifacts in UI mode and I need to completely redraw all primitives.
Could you assist me to solve this issue?
I have a following example and problem is near the runPager() function.
The text was updated successfully, but these errors were encountered: