f



Perl/TK Tk_Freecursor-Error

Hi All,

I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032

In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:

"Tk_FreeCursor received unknown cursor argument"

and the program doesn't finish correctly.

Can someone help me ?

Pit
0
pit
8/20/2015 12:04:58 PM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

5 Replies
633 Views

Similar Articles

[PageSpeed] 9

On 8/20/2015 05:04, pit wrote:
> Hi All,
>
> I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032
>
> In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:
>
> "Tk_FreeCursor received unknown cursor argument"
>
> and the program doesn't finish correctly.
>
> Can someone help me ?

Remove as much code as you can where it still reproduces the error.  This
will either give you an idea of where the fault is or you can post the
small remaining snippet for others to peruse/try.
0
Bill
8/20/2015 9:02:30 PM
Am Donnerstag, 20. August 2015 23:02:42 UTC+2 schrieb $Bill:
> On 8/20/2015 05:04, pit wrote:
> > Hi All,
> >
> > I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032
> >
> > In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:
> >
> > "Tk_FreeCursor received unknown cursor argument"
> >
> > and the program doesn't finish correctly.
> >
> > Can someone help me ?
> 
> Remove as much code as you can where it still reproduces the error.  This
> will either give you an idea of where the fault is or you can post the
> small remaining snippet for others to peruse/try.

here is my the code snippet:

use strict;
use Tk;
use Tk::HList;

my $mw = MainWindow->new(-title => 'Mainwindow',
                         -cursor => 'arrow');
$mw->protocol("WM_DELETE_WINDOW", \&del_win);

my $cursor = $mw->cget(-cursor);

my $hl = $mw->Scrolled('HList',
                       -columns => 1,
                      )->pack(-expand => 1, 
			              -fill => 'both', 
			     	      -side => "top", 
				      -anchor => "nw");

my $i;			 
for ($i = 0; $i <= 20; $i++)
{
  $hl->add($i);
  $hl->itemCreate($i, 0, -text => $i);
}

$hl->update();

MainLoop;

sub del_win
{
  $mw->destroy();
  Tk::exit(1);
}

Start the program, scroll down some lines and finish the program, then the error will be occured. When scrolling down and scroll up again to the first line, it doesn't happen.

pit
0
pit
8/24/2015 10:16:51 AM
On 8/24/2015 03:16, pit wrote:
> Am Donnerstag, 20. August 2015 23:02:42 UTC+2 schrieb $Bill:
>> On 8/20/2015 05:04, pit wrote:
>>> Hi All,
>>>
>>> I have the following problem with programs in perl/tk under Windows 8.1 with perl 5.14 and TK version 804.032
>>>
>>> In the program exists an HList. When I scroll down the list and then finish the program, comes the following message:
>>>
>>> "Tk_FreeCursor received unknown cursor argument"
>>>
>>> and the program doesn't finish correctly.
....
> Start the program, scroll down some lines and finish the program, then the error will be occured. When scrolling down and scroll up again to the first line, it doesn't happen.

I can't reproduce it, so that leads me to believe it's a version/platform issue.
I'm on Doze 8.1 with AS Perl 5.20 and Tk 804.033

See if this one does the same (removed the delete window parts).

use strict;
use warnings;
use Tk;
use Tk::HList;

my $mw = MainWindow->new(-title => 'Mainwindow', -cursor => 'arrow');
my $cursor = $mw->cget(-cursor);
my $hl = $mw->Scrolled('HList', -columns => 1,)->pack(
   -expand => 1, -fill => 'both', -side => "top", -anchor => "nw");
$mw->Button(-text => 'Quit', -command => sub { exit; })->pack(
   -side => 'bottom');
for (my $i = 0; $i <= 20; $i++) {
	$hl->add($i);
	$hl->itemCreate($i, 0, -text => $i);
}
$hl->update();

MainLoop;
0
Bill
8/24/2015 6:28:00 PM
On 2015-08-24, pit wrote:
>Start the program, scroll down some lines and finish the program, then the error will be occured. When scrolling down and scroll up again to the first line, it doesn't happen.

Unable to reproduce on Perl 5.14.2, Perl/Tk 1:804.030-1. Program exits
normally.
0
Roger
8/24/2015 6:32:21 PM
On 2015-08-24, $Bill wrote:
>See if this one does the same (removed the delete window parts).

No error for me, Linux perl 5.14.2 and Perl/Tk 1:804.030-1.

0
Roger
8/24/2015 6:33:38 PM
Reply: