Help with 4ad

Gerardo Valenotti <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAPjXfs33_pXJbqP3jVbe5m-k_M_EEckF8LVTaFOBWj4w2VjZ8Q@mail.gmail.com>
Hi

Server: Suse 12.3 64 Bits - Aubit4gl 1.2-39
Client: Windows 10 64 Bits - VDC 23/08/2016


I'm testing with aubit4gl and VENTAS VDC. The test consists of a small menu
and edit the field with changing menubuttons with 4ad files and a short
validation in the editing field. The window for validation work OK, but i
have
problems with the parameters of the .4ad file. The default.4ad file is
received on the client in %TEMP% directory, the pics of the menu are
deployed
if the name of the imagen are same as the menu, and when edit field the
buttonmenu text are Cancel and Accept. If can make a suggestion i appreciate
it.

4gl file:

GLOBALS
DEFINE registro RECORD
              codigo INTEGER,
              descripcion CHAR(50)
     END RECORD,
     mes_error char(30),
     ws_window ui.Window
END GLOBALS

MAIN
   CALL ui.Interface.loadActionDefaults("default")
   CALL ui.Interface.loadStyles("default")
   CALL ui.Interface.setText("Ejemplo")
   OPEN window prueba WITH FORM "prueba"
   MENU "Opciones"
         COMMAND "Editar"
                CALL editar()
         COMMAND "Salir"
                EXIT MENU
   END MENU
END MAIN


FUNCTION editar()
   INPUT BY NAME registro.*
         AFTER INPUT
                  IF int_flag THEN
                      LET int_flag = false
                      EXIT INPUT
                 END IF
                 IF registro.codigo < 1 THEN
                     LET mes_error = "Valor no valido"
                     CALL w_mensaje("ERROR", mes_error, "stop")
                     NEXT FIELD codigo
                END IF
   END INPUT
   initialize registro.* to null
   display by name registro.*
END FUNCTION

FUNCTION w_mensaje(titulo, mensaje, imagen)
        define titulo char(30),
                  mensaje char(30),
                  imagen char(30),
                  archivo char(50)

   let imagen = downshift(imagen)
   let archivo = "pics/", imagen clipped, ".png"
   if aclfgl_sendfile_to_ui(archivo clipped) then end if
   OPEN window w_mensaje WITH FORM "w_mensaje"
   let ws_window = ui.Window.getCurrent()
   call ws_window.setText("Advertencia")
   let imagen = imagen clipped, ".png" clipped
   display imagen to textvar
   display mensaje to texto
   MENU ""
         COMMAND "Ok"
         EXIT MENU
   END MENU
   if int_flag then
      let int_flag = false
   end if
   close window w_mensaje
end function

default.4ad:

<ActionDefaultList>
<ActionDefault name="Salir" text="Salir del ejemplo" comment="Salir"
image="exit.png" />
<ActionDefault name="Editar" text="Editar campos" comment="Editar campos"
image="korrigieren.png" />
<ActionDefault name="Cancel" text="Cancelar" comment="Salir"
image="exit.png" />
<ActionDefault name="Accept" text="Aceptar" comment="Aceptar campos"
image="ok.png" />
</ActionDefaultList>

Responder
Reenviar

------------------------------------------------------------------------------

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.