Page 1 of 1
Menu choice values not sent to the application
Posted: Sat Aug 02, 2014 2:32 am
by Bruno97
Hi,
I am having a weird problem.
I have a SFL that displays a menu on row click. That menu has binded fields for :
- menu response
- choices
- choice values
choices is programatically set to A,B,C.
choice values is programatically set to 1,2,3.
After the READC, the menu response field should be set to 2 if I click on the B option in the menu.
Weirdly, it is set to B like if choice values was not set at all !
Have you already heard about that ?
Bruno
Re: Menu choice values not sent to the application
Posted: Mon Aug 04, 2014 3:02 pm
by Scott Klement
I don't think it's possible to place a menu widget inside a subfile... So using READC to read the menu response field doesn't seem like it would work.
Are you referring to the 'context menu id' option for a subfile? If so, I would typically use this in conjunction with the 'row selection' feature. You would use row selection so that the user can choose which rows are selected/deselected, and you would use the context menu to determine which action to take. After something is selected from the context menu, you could use READC to read your 'selection field' to find out which rows to operate on.
Is that what you meant? Or, can you explain what you mean by 'after the READC the menu response should be set....'?
Re: Menu choice values not sent to the application
Posted: Mon Aug 04, 2014 5:45 pm
by Bruno97
Hi Scott,
I'm not referring to the context menu id, because what I want to do is to make a menu appear on left click, not right click.
And if I'm right, context menu id works on right click only.
Here is what I'm doing :
I left click on a subfile record. I use a variable binded to the row selection property so the READC works perfectly.
On row click, I change the visibility property of a menu in order to make it visible, using mouse coords.
So far, no round trip to the program...
The menu provides several options. Prior to this, the choices and choice values properties are set in the program, before the EXFMT.
As I left click on an a menu option, a round trip to the program occurs and the menu response should be set with the proper choice value. Instead, it is set with the 1st character of the corresponding choices variable.
I just don't understand why 'choice values' property is ignored in this case ?!
I have managed to achieve that in a couple of programs but in the one I'm working on, no way to make it work properly...
Bruno
Re: Menu choice values not sent to the application
Posted: Mon Aug 04, 2014 6:24 pm
by Scott Klement
I see... so the problem is only that the 'choice values' is ignored for this display. It works on other displays, and is only ignored for this one, correct? Or does 'choice values' not work on any menu widget?
Re: Menu choice values not sent to the application
Posted: Tue Aug 05, 2014 3:22 pm
by Bruno97
We finally managed to make it work using a decimal 2,0 variable for 'menu response' instead of an alpha 1.
And we changed the 'choice values' from '1,2,3' to '01,02,03'.
But I still don't get it why it didn't want to work with the previous settings...
Bruno
Re: Menu choice values not sent to the application
Posted: Wed Aug 06, 2014 3:09 am
by Scott Klement
I don't see why it'd matter if it is decimal or character?
Can you provide me of an example that does not work so I can try it?
Re: Menu choice values not sent to the application
Posted: Wed Aug 06, 2014 12:03 pm
by Bruno97
Scott,
I'm on holidays right now, I'll give you an example when I'm back.
Thanks,
Bruno
Re: Menu choice values not sent to the application
Posted: Wed Aug 06, 2014 12:08 pm
by Scott Klement
No worries. Whenever you have time would be great.