I have a question.. Is it possible to use two TextFieldSelectors in a single Hackystat analysis? It seems to me that this is not possible. However, there seems to be no good reason (in terms of HCI) that we should have that restriction. I believe the same goes for things like the BooleanSelector.
There's certainly no reason from a user interface perspective to disallow more than one text field in a command.
However, it is true that the current implementation of Selectors does not allow you to use the same Selector class multiple times in the same command. This is because the Selector implementation hides the details of extracting the field value from the HTML form, and thus must automatically assign the HTML "name" field for the given element. Since the value of "name" is essentially hard-coded for each Selector, you can only use them once.
The easiest work-around, at present, is to create a second Selector class that will differ from the first only in its name. This, of course, leads to all of the bogosities associated with code cloning, cut-and-pasting, etc.
If we were Orthodox Extreme Programmers, of course, we would refactor at this point. One approach might be to implement an alternative constructor function for the TextFieldSelector that accepts a string to be used for the name. In tandem, one would supply alternative forms of getters/setters that take a name string and return that value. I haven't looked at it closely, but that might work. You could also imagine supporting arrays of TextFields, and so forth.
Cheers, Philip
