Home > Archive > PerlTk > June 2004 > new version breaks script
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 |
new version breaks script
|
|
| Tobias Weber 2004-06-10, 8:57 am |
| Hi,
the following code works fine on MacOS X.2 with Tk800.025.
$tx->insert( 'end', $tr->info( 'data', $path ) );
With X.3.4 and Tk804.027 I got very weird behaviour and error messages
about wrong indices. After much trying a temp string did the trick.
my $newbody = $tr->info( 'data', $path );
$tx->insert( 'end', $newbody );
But why? Where's the big difference?
($tx = Tk::Text; $tr = Tk::Tree)
--
Tobias Weber
| |
| Slaven Rezic 2004-06-14, 9:06 am |
| Tobias Weber <towb@gmx.net> wrote in message news:<2iqvs7Fq961qU1@uni-berlin.de>...
> Hi,
> the following code works fine on MacOS X.2 with Tk800.025.
>
> $tx->insert( 'end', $tr->info( 'data', $path ) );
>
> With X.3.4 and Tk804.027 I got very weird behaviour and error messages
> about wrong indices. After much trying a temp string did the trick.
>
> my $newbody = $tr->info( 'data', $path );
> $tx->insert( 'end', $newbody );
>
> But why? Where's the big difference?
>
> ($tx = Tk::Text; $tr = Tk::Tree)
Tk 804 is now more context-sensitive than Tk 800. Maybe using
$tx->insert( 'end', scalar $tr->info( 'data', $path ) );
would work, too.
Regards,
Slaven
| |
| Tobias Weber 2004-06-14, 3:57 pm |
| Slaven Rezic wrote:
> Tobias Weber <towb@gmx.net> wrote in message news:<2iqvs7Fq961qU1@uni-berlin.de>...
[color=darkred]
>
>
> Tk 804 is now more context-sensitive than Tk 800. Maybe using
>
> $tx->insert( 'end', scalar $tr->info( 'data', $path ) );
>
> would work, too.
It does. While I think it is acceptable to give up some backwards
compatibility for easier/safer argument passing this definitly needs a
better error message...
--
Tobias Weber
|
|
|
|
|