Hello,
The Command Reference on @uiradio reads
"The dialog shows an OK and Cancel button, and will return an integer representing the button clicked: Cancel (-1), OK (0)."
However, the Cancel button returns 1 not -1
scalar selection = 0
@uiradio(selection, "Please select an item:", "Item1 Item2 Item3")
@uiprompt(@str(selection))
@uiradio bug: Cancel button returns 1 not -1
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @uiradio bug: Cancel button returns 1 not -1
I just checked it, and it does return -1.
Code: Select all
scalar selection=1
scalar retval = @uiradio(selection, "Please select an item:", "Item1 Item2 Item3")
show retval
Follow us on Twitter @IHSEViews
Re: @uiradio bug: Cancel button returns 1 not -1
Thanks. I had not understood that there are two scalars involved, one to store the selection and the other to store the return value.
It would be helpful if both scalars could appear in the example in the help.
It would be helpful if both scalars could appear in the example in the help.
Who is online
Users browsing this forum: No registered users and 32 guests