For the needs of a line drawing program, I need to edit an array of integers. The only constraint on the array is its length, which has to be even, and greater or equal to two. The solution I have for now looks like this:
The [ x ] stands for editable text boxes.
Initially: ( this one represents the default dashed line: - - - -)
[ 1 ] [ 1 ] [ ] [ ]
User has filled one of the two empty fields: (inconsistent state)
[ 1 ] [ 1 ] [ 2 ] [ ]
User has filled the remaining field:
[ 1 ] [ 1 ] [ 2 ] [ 2 ] [ ] [ ]
Is this correct, or is there a better way to do this ?
Edit: I don't want any form of markup language as suggested in one answer.