There appears to be an intermittent bug using the value= method of the ooDialog dialogControl class with an instance of the ListControl class which has the report & showselalways styles, but not the singleSel style
This behaviour is intermittent, but I have seen it repeatedly on ooRexx 3.2.0 on Windows XP (Pro 2002 SP3) AND ooRexx 4.0.1 (Built May 2, 2010) on Windows Vista (Home Premium SP2).
I attach a test program that intermittently demonstrates this.
If one attempts to select multiple lines of a listControl using the form
lc~value= '1 2 4'
Then occasionaly row 0 is prepended to the list of rows to be selected and is selected.
Checking lc~value afterwards will show '0 1 2 4 '
This appears to be a timing issue, as it happens on my machines about one time in 20 unless one puts a trace i/trace n around the line in which case it happens (to me) every single time.
There is a simple workaround.
If you suffix your list of row values with a space (which is how lc~value presents them to you) then as far as I can tell, this problem goes away entirely.
It may be that rather than 'fixing' this the best thing to do would be to put a note in the manual telling people to suffix lists of row selection candidates with a space. Probably, in some documentation for the XP & Vista ListControl Microsoft have written this instruction, and it is only naive ooDialog users that fall foul of it.
To use the test program, start it, select some rows (but not the first one), press TEST repeatedly. If the first row becomes selected you have seen a failure.
thanks,
Jon
Anonymous
Demonstrates bug behaviour intermittently
Hi Jon,
I'll take a look. Thanks for the test progam.
I vaguely remember something like this. I may have it fixed in trunk, I'm not sure.
Thanks Jon, that was a good catch.
The cause was walking past the end of the string when it did not end with a space. It was intermittent due to random memeory, not timing. The fix will be in the next release.
Thanks for the investigation and fix.
Fast service as ever. Jon
Committed revision 6181.
4.1.0 merge.
The fix for this item was in the 4.1.0 release.