Where do you see "Tool completed with exit code 255"????
When you use this tk-hlist_stresstest.pl, do you also the error? What line exactly triggers the error ( use Devel::Trace )?
#!/usr/bin/perl --
#!perl
use strict;
use warnings;
use Tk;
use Tk::HList;
my $mw = tkinit();
my $left = $mw->Frame( -bg => 'blue', -width => 210 )
->pack( -side => 'left', -fill => 'x', -expand => 1, );
put_hlist($left);
my $right = $mw->Frame( -bg => 'yellow' )
->pack( -side => 'left', -fill => 'both', -expand => 1, );
my $info = $right->Label()->pack( -fill => 'x' );
$mw->MainLoop();
sub put_hlist {
my $parent = shift;
my $hlist = $parent->Scrolled(
'HList',
-scrollbars => 'osoe',
-selectmode => 'single',
-columns => 2,
-header => 1,
-width => 100,
-height => 30,
-background => 'GhostWhite',
)->pack( -fill => 'both', -expand => 1 );
$hlist->header( 'create', 0, -text => '#id', );
$hlist->header( 'create', 1, -text => 'Eintrag', );
foreach my $cnt ( 0 .. 10000 ) {
$hlist->add($cnt);
$hlist->item( 'create', $cnt, 0, -text => $cnt );
$hlist->item( 'create', $cnt, 1, -text => "Eintrag Nr. $cnt" )
+;
}
$hlist->configure(
-command => [
sub {
my $hlist = shift;
my $info_label = shift;
my $selected_item_no = $hlist->info('selection');
return 0 unless defined $selected_item_no;
# -- get selected text id
my $text_id = $hlist->itemCget( $selected_item_no, 0,
+'-text' );
# -- display name in right frame
$info->configure( -text => $text_id );
return 1;
},
$hlist,
$info
],
);
}
What happens when you use use Win32API::File(); Win32API::File::SetErrorMode(2);
What happens if you end program with POSIX::_exit(0);?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.