[twill] Named and unnamed forms problem and ugly workaround

Titus Brown titus at caltech.edu
Fri Nov 9 19:32:28 PST 2007


On Fri, Nov 09, 2007 at 05:37:41PM -0200, Renato Borges wrote:
-> Hello everyone!
-> 
-> First of all, I'd like to thank everyone involved with the twill project for
-> creating and maintaining a very useful tool!
-> 
-> To time-deprived readers, I'll explain it briefly:
-> 
-> My problem is that unnamed forms that sit on a page that have a named form
-> that has the unnamed form's number as part of its name cannot be accessed
-> through regular fv's. For instance, if form #1 is named "Form-123" then
-> unnamed forms #2 and #3 cannot be accessed by fv (2, , ) or fv ( "3", , )
-> because the numbers 2 and 3 and the strings "2" and "3" are matched to the
-> "Form-123" form.
-> 
-> I suppose that a pretty solution would be to subclass the twill browser and
-> add a matching process that prioritizes number matching. But I cannot do so
-> right now.

heh, good unintended consequence.  Thanks for debugging this.

I would be inclined to favor number matching over regexp matching,
reversing the lookup priority, because of this problem.  Would this
cause new problems for anyone?

cheers,
--titus



More information about the twill mailing list