Skip Menu |

This queue is for tickets about the Curses-UI CPAN distribution.

Report information
The Basics
Id: 5621
Status: resolved
Worked: 2 min
Priority: 0/
Queue: Curses-UI

People
Owner: marcus [...] cpan.org
Requestors: ged-cpan [...] faeriemud.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.92
Fixed in: (no value)



Subject: TextEditor widget missing documented onChange() handler
The documents for Curses::UI::TextEditor mention a onChange() event handler, but it doesn't exist in the 0.92 version of TextEditor.pm, and doesn't seem to be inherited from anything. I get the error: Can't locate object method "onChange" via package "Curses::UI::TextViewer" at ./cvsrshell.pl line 183. Line 183 is (approximately): $tv->onChange( sub {my $this = shift; $this->cursor_to_end} ); where $tv is a TextViewer widget that displays a running log of actions.
--- TextEditor.pm~ 2003-10-17 02:37:58.000000000 -0700 +++ TextEditor.pm 2004-03-10 15:18:14.000000000 -0800 @@ -234,6 +234,8 @@ return $this; } +sub onChange(;$) { shift()->set_event('-onchange', shift()) } + sub getrealxpos() { my $this = shift;
The method for setting the eventhandler was actually missing. This is resolved in CVS and will be in the next version. A workaround till then is to specify the event handler during the creation of the widget with the -onchange option.