Bug in Popup (None Specified)
At 22 MAR 1999 09:10:11PM Richard Bright wrote:
Problem with Popup
The Popup function produces erroneous results when used as ORDERED MULISELECT with more than a small number of select values.
eg
* Test subroutine called from Form TEST
declare function popup
Parent=TEST'
d =line 1,line 2,line 3,line 4,line 5,line6,line 7,line 8,line 9,
d:=line 10,line 11,line 12,line 13,line 14,line 15,line16'
convert ',' to @vm in d
p ='
p=d
p=1:@svm:10
p= 'L'
p=3
p=E'
@ans=popup( Parent, p)
/*and the result when selecting all lines in the popup from the bottom to the top:
LINE 16
At 23 MAR 1999 06:33AM Oystein Reigem wrote:
Richard,
I have ordered multiselect popups too, so I was alarmed by your discovery, but fortunately I use them in cases where the user never would select more than a few items. I think. With users you never know.
![]()
I tried your code and it seems like odd things start to happen when you select 10 items or more. The pattern seemed to be fairly simple once you spot it. E.g if you select thirteen items, you get them in the following order:
1st item selected
10th item selected
11th item selected
12th item selected
13th item selected
2nd item selected
3rd item selected
4th item selected
5th item selected
6th item selected
7th item selected
8th item selected
9th item selected.
Looks like a straightforward bug to me. Unless we both made the same mistake in the parameters. But that seems unlikely, because my popup is not programmatic but designed with Popup Designer or UI Workspace.
Btw - I think there must be two bugs. Let's say you click your way sequentially through ten or more contiguous items. Then you miss one of the items - by mistake you click twice on the same item so it gets deselected. To correct that you click a third time to select it again, and continue. Then you get a different result than if you didn't miss. Bizarre.
- Oystein -
PS. I have OI 3.61 and haven't checked other versions.
At 23 MAR 1999 07:58PM Richard Bright wrote:
Thanks for that informative response. Looks like this part of Popup function needs overhall.
BTW my test was OI version 3.71
Also found a bug? in RLIST List functionality using LIMIT - it screws up any displayed date values even when these are un-related to the filter process.
Richard Bright
At 25 MAR 1999 09:20PM Richard Bright wrote:
What is the bet that the select order field is incorrectly justified left whereas it should be right justified.
BTW suprised havn't had a response from RTI
Richard Bright
At 26 MAR 1999 06:06AM Oystein Reigem wrote:
Richard,
What is the bet that the select order field is incorrectly justified left whereas it should be right justified
That's my guess too. Perhaps it's very seldomn in practice that more than a few items are selected in popups with ordered selects? So perhaps a bug like that could go unnoticed for a long time?
Btw - has it occurred to you that if the bug is what we think it's possible to make a workaround?: If the number of items selected (N) is greater than 9, generate an array with the numbers 1 to N. Sort the array the wrong way (i.e, left justified). Merge with the array of selections. Sort the numbers back the correct way (right justified). Strip away the numbers again. Yuck! Gross! But it would work - until RTI fixed the bug.
- Oystein -
At 26 MAR 1999 11:00AM Cameron Purdy wrote:
Hi Richard,
suprised havn't had a response from RTI
I am responsible for Popup fixes. This thread is book-marked in my folder for things that must be checked for the next release.
Cameron Purdy
Revelation Software
At 29 MAR 1999 07:38PM Richard Bright wrote:
Thanks Cameron for letting me know that this was noted. Guess I was getting a little mischievous and noted any offical reaction.