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

Re^2: perltk: error getting values from dynamically generated combo boxes

by ruhroh (Initiate)
on May 07, 2012 at 21:30 UTC ( #969337=note: print w/replies, xml ) Need Help??


in reply to Re: perltk: error getting values from dynamically generated combo boxes
in thread perltk: error getting values from dynamically generated combo boxes

The problem is that:

$field_id = $listb$listb_index -> curselection();

only returns a value if it is retrieving a value from the last listbox created. Otherwise, it will return a value "". I have been looking at the documentation for listbox from: http://search.cpan.org/~srezic/Tk-804.030/pod/Listbox.pod . But I don't know why my script can't retrieve the values from the first created listbox.

UPDATE: I did a check to see if the previous listboxes existed by just doing a get(0). They all print out dog as expected.

So the problem is why doesn't curselection not work on the old listboxes and only the most recently "added" listbox?

  • Comment on Re^2: perltk: error getting values from dynamically generated combo boxes

Replies are listed 'Best First'.
Re^3: perltk: error getting values from dynamically generated combo boxes
by SuicideJunkie (Vicar) on May 08, 2012 at 14:09 UTC

    I tried to look back where your $listb is coming from. (needs a better name BTW - I've no idea what it is for) and it got confusing pretty quick.

    I suggest regenerating your indentation with perltidy, and taking a closer look at @content and the repeated ties. I'm not familiar with tie, but I'd guess that you're making a giant knot out of all your gui elements there.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://969337]
help
Chatterbox?
[ww]: or a lot more than (22*2) for /me
[ww]: er -- senior cognitive deficiency: ((22+(22*2))
[ww]: (but pls don't s/senior/senile/ ... not yet
[karlgoethebier]: A bit more audience now: The Impact of Information Sources on Code Security Very interesting IMHO...
[karlgoethebier]: ..it's about copy & paste ;-)
[ww]: Wonder what IEEE would have thought w/survey based on PM/perl
[ww]: s/thought/found/
[erix]: that title is a broken* sentence, no? But maybe that's deliberate
[karlgoethebier]: ww:My first thought, to be honest...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-09-25 14:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (280 votes). Check out past polls.

    Notices?