[twill] Setting ListControls by Value

Titus Brown titus at caltech.edu
Tue Nov 29 00:01:43 PST 2005


-> > could you give me an example case where you need to do this?
-> 
-> If you had a dropdown as follows:
-> 
-> <select name="city">
->      <option value="1">Los Angeles</option>
->      <option value="2">San Francisco</option>
-> </select>
-> 
-> and you want to say:
-> 
->      br['city'] = 'Los Angeles'
-> 
-> instead of
-> 
->      br['city'] = 1
-> 
-> Suresh

Ahh!  I see.  OK, thanks.

I've put in something that fixes this: basically, it searches by value
*first*, then by label.

It'll be part of 0.8, being released right... about... now!

cheers,
--titus



More information about the twill mailing list