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


In reply to Re: Changing state for gridded Entry? by kcott
in thread Changing state for gridded Entry? by cniggeler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.