button issue

longhair

Member
afternoon all,
have a small issue that i don't understand. would think that the below code would work fine but it is not. any suggestions would be greatly appreciated. code snippet below.
Code:
def z1 as int.
def button btn-exit label   "           Exit            ".
def button btn-both label "        Print Both       ".                          
def button btn-bar label  "    Print Barcode Only   ".                          
def button btn-add label  "    Print Address Only   ".                          
def frame f-delphi btn-both skip (0) btn-bar skip (0)                           
                   btn-add skip (0) btn-exit skip (0).
z1 = 1.
if ... then do:                  
   enable all with frame f-delphi.                                              
   wait-for choose of btn-exit focus btn-both.                                  
   on choose of btn-both do:                                                    
    z1 = 1.                                                                     
   end.                                                                         
   on choose of btn-bar do:                                                     
    z1 = 2.                                                                     
   end.                                                                         
   on choose of btn-add do:                                                     
    z1 = 3.                                                                     
   end.                                                                         
  end.                                                                          
  display z1.
z1 never gets changed to anything else.
regards,
longhair
 

longhair

Member
Pradeep,

thanks a bunch. knew it would be easy and i should remember, by now, to place the wait-for at the end.

regards,
longhair
 
Top