Skip to content

Scrolled emits warnings when scrollbar is dragged and locale-set decimal separator is "," #107

@scfc

Description

@scfc

On Fedora 39, with perl-Tk-804.036-13.fc39.x86_64, the test script scrollbar-test.pl:

#!/usr/bin/perl -w

use strict;
use utf8;
use warnings;

use Tk;

my $MW = new MainWindow (-title => 'Test');
my $Listbox = $MW->Scrolled ('Listbox', -scrollbars => 'oe', -height => 0, -width => 0, -selectmode => 'multiple');
foreach my $i (1..1000) {
    $Listbox->insert ('end', 'Test entry #' . $i);
}
$Listbox->grid (-sticky => 'nesw', -row => 0, -column => 0);
$MW->gridRowconfigure (0, -weight => 1);
$MW->gridColumnconfigure (1, -weight => 1);
Tk::MainLoop ();

will emit warnings of the type:

Argument "0,00102881" isn't numeric in addition (+) at ../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/Drag.al) line 293.
Argument "0,00514403" isn't numeric in addition (+) at ../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/Drag.al) line 293.
Argument "0,0133745" isn't numeric in addition (+) at ../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/Drag.al) line 293.
Argument "0,0246914" isn't numeric in addition (+) at ../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/Drag.al) line 293.
Argument "0,0442387" isn't numeric in addition (+) at ../blib/lib/Tk/Scrollbar.pm (autosplit into ../blib/lib/auto/Tk/Scrollbar/Drag.al) line 293.
[…]

to stderr when the scrollbar is dragged up and down and the locale's decimal separator is "," (e. g. LC_NUMERIC=de_DE.UTF-8 perl scrollbar-test.pl). If the locale's decimal separator is "." (e. g. LC_NUMERIC=en_GB.UTF-8 perl scrollbar-test.pl), no warnings are emitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions