Marc

Here is some code I used in 6.5 to get the value of
the button's name. It is set to only retrieve the
first four characters of the buttons name because
rbase would crash if I had a button named shorter
that what it expected. I don't remember all the
details, but I ran into this in ver 6.1 and just
have continued this way to this day.
I haven't tested this in 7 yet.

SET VAR vbutton = (SGET(.#FORM_COLUMNNAME,4,1))
SET VAR vbuttn = (STRIM(.vbutton))
SET VAR vbutn = (LUC(.vbuttn))

SWITCH (.vbuttn)
  CASE 'EXIT'
    --Leave, but check if something needed to be saved
    CLOSEWINDOW
    BREAK
  CASE 'SAVE'
    SAVEROW
    BREAK
  CASE 'LEAV'
    --Leave, don't save row
    DELROW
    CLOSEWINDOW
    BREAK
ENDSW

I follow the same method when working on the
getting the percent.

SET VAR vm_button = (SGET(.%1,4,1))
SET VAR vm_buttn = (STRIM(.vm_button))
SET VAR vm_butn = (LUC(.vm_buttn))


Jim Limburg


marc schluter wrote:
This should be simple but I can't seem to get it to
work.

I have a menu form with buttons.  The eep should get
the button name, close the window, then run a command
file in a case statement.

I see how the example works in Rrbyw4 but when I trace
my eep the var gets set to .%1 not the button name.

I use to use SET VAR vbutton =
(CVAL'form_field_name'))  but that doesn't seem to
work.  So, I replaced that with set var VmenuOption =
.%1 but no luck so far.

sorry about asking so many questions
marc




__________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree





Reply via email to