I am learning Curses::UI and am trying to mix printing to stdout with the curses elements. Here is a code snippet:
However, I never see the "outside of mainloop!" printed to stdout.#!/usr/bin/perl use strict; use warnings; use Curses::UI; my $cui = new Curses::UI( -color_support => 1, ); my $window = $cui->add( "main_window", "Window", -width => 50, -height => 4, ); my $text_editor = $window->add( "description_text", "TextEditor", -text => "", -title => "Enter Description", -border => 1, -singleline => 1, -width => 40, -bfg => "red", -titlereverse => 0, -showlines => 1, -x => 0, -y => 0, ); my $okay_button = $window->add( "buttons", "Buttonbox", -border => 1, -width => 6, -bfg => "blue", -x => 40, -y => 0, -buttons => [ { -label => "Okay", -value => 1, -shortcut => "o", -onpress => sub { $cui-> +mainloopExit; }, }, ], ); $text_editor->focus; $cui->mainloop; print "outside of mainloop!\n";
Any ideas?
Thanks for the help,
-mzIn reply to mixing curses::ui with stdout program by mzagrabe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |