Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Can't use string as HASH ref

by Abigail-II (Bishop)
on Jul 23, 2002 at 16:04 UTC ( [id://184466]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Can't use string as HASH ref
in thread Can't use string as HASH ref

Where do you have the my $info? And where do you set $info. I suggest carefully inspecting your code and see where $info gets modified. It's very likely that that's were it's going wrong.

Abigail

Replies are listed 'Best First'.
Re: Re: Can't use string as HASH ref
by dimmesdale (Friar) on Jul 23, 2002 at 16:50 UTC
    My mistake.

    my $info is in the generate_options subroutine (I accidently deleted that part because the line defined other variables that cluttered the code up).

    Sadly, $infois only modified in the optionmenus select behaiviour (well, not entirely true; however, $info->{subdir} and $info->{file} are only modified as seen in the code above.

    I think I may just have to try a different approach ... too many headaches, too few time :(

      As far as I can see, $info is not modified at all in the above code.

      Abigail

        I'm sorry, I see what you're getting at now.

        No, I don't *directly* modify the variable ... however I let the *underlying* Tk system modify it. In the optionmenu call I set the -variable option to a reference to $info, and that allows $info->{subdir} to be updated as the selection in the optionmenu (a drop down list) is made ... and I'm pretty sure this works. In the error message the string that it reported matched exactly with the one I selected in the optionmenu.

        Sorry this has taken up so much space.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-20 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found