Home > Archive > PERL POE > February 2007 > Bug in Curses::UI::POE ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Bug in Curses::UI::POE ?
|
|
|
| Folks,
I'm making a simple UI for a networked utility and have found the
following. Since I'm using a listbox, this is how I found how
about this. I haven't done any other testing, nor did I have
looked at any POE code. I have the utility to do and that takes
my time.
The problem is about key presses. If you start the demo-widgets
with the list demo (window number 5) and if you immediately press
the down arrow key, there'll be a out-of-sequence situation that
has the net result of making the UI unusable.
Now, if you start the same list demo directly (see below) and
instead of pressing a down arrow as the first key, you press the
space bar (or any other plain key - as opposed to extended), then
everthing is OK.
To start the demo directly in the list demo add the following:
$current_demo = 5;
before:
$w{$current_demo}->focus;
Near the end of the file.
Another way of demoin the problem just by comparing between using
Curses::UI and Curses::UI::POE:
# -------------------------------------------
#!/usr/bin/perl
use warnings;
use strict;
use Curses::UI::POE;
my $cui = new Curses::UI;
#my $cui = new Curses::UI::POE;
my $win = $cui->add('window_id', 'Window');
my $listbox = $win->add
(
'mylistbox', 'Listbox',
-values => [1, 2, 3],
-labels => { 1 => 'One',
2 => 'Two',
3 => 'Three' },
-radio => 1,
);
$win->focus();
# <CTRL+Q> : quit.
$cui->set_binding( sub{ exit }, "\cQ" );
$cui->mainloop();
# -------------------------------------------
System: Fedora Core 6
Perl: 5.8.8
POE: 0.9917
The rest: got from CPAN today.
Is this a system (eg. inputrc) problem or a real bug ?
Thanks !
Al.
| |
| Rocco Caputo 2007-02-18, 4:15 am |
| You might try submitting this as a bug to bug-curses-ui-
poe@rt.cpan.org. I'm not sure whether the author is reading this list.
--
Rocco Caputo - rcaputo@pobox.com
On Feb 17, 2007, at 18:27, lanas wrote:
> Folks,
>
> I'm making a simple UI for a networked utility and have found the
> following. Since I'm using a listbox, this is how I found how
> about this. I haven't done any other testing, nor did I have
> looked at any POE code. I have the utility to do and that takes
> my time.
>
> The problem is about key presses. If you start the demo-widgets
> with the list demo (window number 5) and if you immediately press
> the down arrow key, there'll be a out-of-sequence situation that
> has the net result of making the UI unusable.
>
> Now, if you start the same list demo directly (see below) and
> instead of pressing a down arrow as the first key, you press the
> space bar (or any other plain key - as opposed to extended), then
> everthing is OK.
>
> To start the demo directly in the list demo add the following:
>
> $current_demo = 5;
>
> before:
>
> $w{$current_demo}->focus;
>
> Near the end of the file.
>
> Another way of demoin the problem just by comparing between using
> Curses::UI and Curses::UI::POE:
>
> # -------------------------------------------
>
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> use Curses::UI::POE;
>
> my $cui = new Curses::UI;
> #my $cui = new Curses::UI::POE;
>
> my $win = $cui->add('window_id', 'Window');
>
> my $listbox = $win->add
> (
> 'mylistbox', 'Listbox',
> -values => [1, 2, 3],
> -labels => { 1 => 'One',
> 2 => 'Two',
> 3 => 'Three' },
> -radio => 1,
> );
>
> $win->focus();
> # <CTRL+Q> : quit.
> $cui->set_binding( sub{ exit }, "\cQ" );
> $cui->mainloop();
>
> # -------------------------------------------
>
> System: Fedora Core 6
> Perl: 5.8.8
> POE: 0.9917
> The rest: got from CPAN today.
>
> Is this a system (eg. inputrc) problem or a real bug ?
>
> Thanks !
>
> Al.
|
|
|
|
|