Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 30 APR 1999 09:57:40AM Donald Bakke wrote:

I'm hoping it's me, but I can't seem to figure this out…

I've created a simple ordered popup with 18 literal values in the User Interface Workspace. When I test the popup here I get my results in the exact order I selected them.

However, when I call the popup from within code, I get my results sorted according to which selection appears first in the literal list (i.e. as if it was a Multiple selection only).

My code is simple: Shapes=PopUp(@Window, "", "SHAPES")

Is this a bug?

dbakke@srpcs.com

SRP Computer Solutions


At 30 APR 1999 12:44PM Cameron Purdy wrote:

Don,

You mean an ordered-selection multiple choice popup? Where it tells you what order the items were selected in?

Can you look at the Popup record and make sure the type/mode stuff is correct?

Cameron Purdy

Revelation Software


At 30 APR 1999 04:42PM Donald Bakke wrote:

Cameron,

Yes, this is an ordered-multiple selection popup. Near as I can tell, the record looks good. Does the User Interface Workspace run different logic than the PopUp function itself?

Here is the record as stored in the SYSREPOSPOPUPS table:

-1

-1

-1

-1

16777215

MS Sans Serif
-11
400
0
0
0
0
34
0
1
2
1
0
0



Square
Rectangle
Parallelogram
Trapezoid
Triangle
Hexagon
Circle
Ellipse
Parabola
Sphere
Cube
Rectangular Parallelo
Cylinder (Hollow)
Cylinder (Solid)
Cone (Hollow)
Cone (Solid)
Frustrum of Cone (Hollow)
Formed Spring

1
20
L
L

Options

L

3

Shapes

1

F

1

1

1

1

1

1

1

0

0

0

0

Thanks,

dbakke@srpcs.com

SRP Computer Solutions


At 30 APR 1999 04:56PM Donald Bakke wrote:

Cameron,

I tried something else which is making me think that I might be misunderstanding how multiple-selection popups work. I had assumed that my results would return in the order selected. I made this assumption based on the User Interface Workspace displaying in a nice message box:

Return Values:

Cube

Ellipse

Triangle

…which is the exact order I selected those in. This is using either Popup Column or Popup Row as my "Value Returned" choice. In both cases when I launch the popup using the PopUp function, I get the same results but not in the order I selected them. For example:

Triangle

Ellipse

Cube

However, if I choose Row Position as my "Value Returned" choice, I do get the correct row positions returned in the order I selected them in both the UI Workspace and in the PopUp function. Is this how I am supposed to use ordered-multiple selection popups? That is, I need to cross-reference the row position against the original list and create my own sorted list results? I'm skeptical that this is supposed to be the way to do it, but for some reason this Mode/Type combination works.

Thanks,

dbakke@srpcs.com

SRP Computer Solutions


At 02 MAY 1999 05:03AM Richard Bright wrote:

Don, We identified a bug in the Popups, Ordered multiple select. This seems to occur where select exceeds 10 and is likely to do with justification. This problem has been logged


At 02 MAY 1999 02:49PM Donald Bakke wrote:

Cameron, et al.,

Okay I think I've figured out what the real problem is. It does not have to do with UI Workspace vs. PopUp() function. The problem is how you toggle your selections. Apparantly I must have been switching my methods consistantly when testing this.

Anyway, if you use the mouse to select your options then you get a correctly sorted list. If you use the space bar then your list will not be sorted. Simple as that. I don't know why there is a difference since I haven't looked into the code yet, but I'm hoping someone at Revelation can spot this pretty quickly (although I am somewhat expecting that this post will be missed due to RevU.)

I would really like this repaired because using the keyboard to toggle options is an efficient method.

Thanks,

dbakke@srpcs.com

SRP Computer Solutions


At 03 MAY 1999 08:48AM Oystein Reigem wrote:

Donald,

Are you sure you get it correct when you use the mouse and wrong when you use the keyboard?

Here with me I get a very systematic error when I use the mouse.

If I use the mouse and change my mind (deselect) I still get a wrong result, but I cannot see the pattern anymore.

I've only tried one very simple experiment with the keyboard: select all items sequentially from the top, and that worked.

I think perhaps your problem is related to mine. Or I should say Richard's problem. Please check out the thread about Richard's problem! Here's a link to one of my postings in that thread: http://www.revelation.com/THEWORKS/OIdiscuss.nsf/ef8405490de3608f85256700005245e4/17FF892D5A7D89448525673D0039F5F7?OpenDocument

- Oystein -


At 03 MAY 1999 02:53PM Donald Bakke wrote:

Oystein,

It seems clear to me that there might be several problems, as has been suggested already.

But for my situation I'm pretty certain of what the issue is. Very simple actually. I have 18 literal options. If I use the mouse to select them (I've been selecting 3 for testing purposes) it sorts correctly. If I use the space bar it doesn't. I don't know how to simplify this even more.

dbakke@srpcs.com

SRP Computer Solutions


At 04 MAY 1999 12:53PM Oystein Reigem wrote:

Don,

It seems clear to me that there might be several problems, as has been suggested already.

Several problems there might be, but I still suspect we have the same problems.

But for my situation I'm pretty certain of what the issue is. Very simple actually. I have 18 literal options. If I use the mouse to select them (I've been selecting 3 for testing purposes) it sorts correctly.

3 is for wimps. Try to select at least 10 items. I'll bet the 10th item you select squeezes in between the 1st and the 2nd. It's like these numbers (the order you select them in) get a final left justified re-sort before you get them back from the popup.

It's very systematic so if you're crazy enough you can make a workaround that re-sorts the selections in the correct order.

Except if the user clicks several times on the same item(s). Then the results get more unpredictable. (In my experiments with this it seems the more de-/reselecting I do, the better the result gets.)

If I use the space bar it doesn't. I don't know how to simplify this even more.

I tried some more with the space bar too, and I agree with you. It seems you get it unsorted all the time. Even with 10 items and more. And no matter how much you change your mind (de- and reselect).

(My users will never select more than a very few items in my app's only multi-select popup, and I doubt they will change their mind often, so I thought I was in the clear. But of course if they use the keyboard there will be problems. Thanks for warning me about this.)

For fun also try to use a mixture of mouse clicks and keyboard. Well, I don't really know if this is your idea of fun, but at least it might lead to a second necessary part of that crazy workaround. It seems if you start with a mouse click you get the "mouse click behaviour" for the rest of the selection process, no matter how much you use the keyboard. And if you start with the keyboard you get the "keyboard behaviour", no matter how much you mouse around afterwards. So perhaps you can discipline your popup with a well-placed initial programmatic mouse click or two. It might mean you have to make your own popup, of course, but we have got the source, haven't we? And we really do love programming and development work, don't we?

Sorry - don't mean to wind you up. I hope RevSoft looks into the matter soon.

- Oystein -

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/6629ff19a81dddca85256763004cb113.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1