in reply to Changing state for gridded Entry?

G'day cniggeler,

"... state of the Entry ... is actually an array ..."

Your underlying problem is that you're calling configure() where you should be calling cget(). Take a look at Tk::options; from the SYNOPSIS:

$value = $widget->cget('-option'); ... @list = $widget->configure('-option');

That's why you're getting an array.

There's a lot of other problems with the code you presented. I'd start by putting the following before the code you have there and fixing all of the issues it tells you about. See "perlintro: Perl introduction for beginners" if this code is unfamiliar to you.

use strict; use warnings;

You should also remove leading '&'s from subroutine calls unless you know exactly what you're doing and can explain fully why you're doing it. See "perlsub: Perl subroutines".

"... a checkbox is checked elsewhere ..."

Your code doesn't contain any references to Tk::Checkbutton. There could be some other problem(s) there but, without seeing the code, it's impossible to tell.

— Ken

Replies are listed 'Best First'.
Re^2: Changing state for gridded Entry?
by cniggeler (Sexton) on Jun 10, 2023 at 20:13 UTC
    Hi, thanks for your reply.

    Context is everything:

    - I stated this was boiled down to a test case

    - The actual text was, "e.g., a checkbox is checked elsewhere"

    In a separate comment to the other responder, my main concern is that $test1 -> Entry is not actually pointing to the correct Entry! Do you have a suggestion for that?
      "Do you have a suggestion for that?"

      I see no evidence that you've taken any notice of the suggestions I've already made. Making more suggestions would seem to have little merit.

      — Ken