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?