Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Array of TK::Checkbuttons not acting appropriately

by mikasue (Friar)
on Oct 02, 2006 at 02:31 UTC ( #575830=note: print w/ replies, xml ) Need Help??


in reply to Re: Array of TK::Checkbuttons not acting appropriately
in thread Array of TK::Checkbuttons not acting appropriately

This is the line that is erroring

    if ($checkboxvalue[$t] == 1)

This is the error

Use of uninitialized value in numeric eq (==) at BPP/BILL.pm line 148.

I declare @checkboxvalue = () as such.

Should I do this also $checkboxvalue$t = 0; ?
I dont' understand why it is "uninitialized".

Update:
It seems that when I click the checkbox the onValue is not being set. So below is my declaration of the Checkbutton

$checkbox[$t] = $bill_table->Checkbutton(-variable=>\$checkboxvalu +e[$t]);

Perhaps -variable is not what I should use. I'm going to read more on the Checkbutton options


Comment on Re^2: Array of TK::Checkbuttons not acting appropriately
Select or Download Code
Re^3: Array of TK::Checkbuttons not acting appropriately
by GrandFather (Cardinal) on Oct 02, 2006 at 02:50 UTC

    I suggest you converge your problem code toward the sample I gave. If your problem remains at the end of that process, post the code and we will help further.

    Your immediate problem is likely to be that you are indexing an element that wasn't present in the array, so it is being created for you and set to undef. It is not clear from your code where $t may be set to anything other than 0, but it seems likely in your "real" code that it is.

    Again I suggest that you reproduce the problem in a small sample application (see my sample as a guide) that we can run and check.


    DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575830]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2014-08-31 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls