Page 1 of 1

FiveWeb Error en los botones

PostPosted: Sun Jun 16, 2013 1:14 pm
by pablovidal
Hola Antonio,

Cuando trato de compilar me da este error
Code: Select all  Expand view
arbour 3.2.0dev (Rev. 18002)
Copyright (c) 1999-2012, http://harbour-project.org/
Compiling 'lotenet.prg' and generating preprocessed output to 'lotenet.ppo'...
lotenet.prg(29) Error E0030  Syntax error "syntax error at '@'"
lotenet.prg(30) Error E0030  Syntax error "syntax error at '@'"
2 errors
 


Estas lineas corresponden a esto
Code: Select all  Expand view

   @ 265, 189 BUTTON Prompt "Ok"     SIZE 110, 40 OF oDlg ACTION MsgInfo( oGetName.value + CRLF + oGetPass.value ) // executed in the client in javascript
   @ 265, 335 BUTTON Prompt "Cancel" SIZE 110, 40 OF oDlg ACTION ( oDlg:End() ) // Executed in the server in advance
 

Re: FiveWeb Error en los botones

PostPosted: Sun Jun 16, 2013 1:41 pm
by Antonio Linares
Pablo,

Te falta incluir las variables que contendran los objetos:

@ 265, 189 BUTTON oBtnOk Prompt "Ok" SIZE 110, 40 OF oDlg ACTION MsgInfo( oGetName.value + CRLF + oGetPass.value ) // executed in the client in javascript
@ 265, 335 BUTTON oBtnCancel Prompt "Cancel" SIZE 110, 40 OF oDlg ACTION ( oDlg:End() ) // Executed in the server in advance

ó no especifiques la claúsula PROMPT:

@ 265, 189 BUTTON "Ok" SIZE 110, 40 OF oDlg ACTION MsgInfo( oGetName.value + CRLF + oGetPass.value ) // executed in the client in javascript
@ 265, 335 BUTTON "Cancel" SIZE 110, 40 OF oDlg ACTION ( oDlg:End() ) // Executed in the server in advance

Re: FiveWeb Error en los botones

PostPosted: Sun Jun 16, 2013 4:09 pm
by pablovidal
Antonio, le quite el prompt y sigue igual

Re: FiveWeb Error en los botones

PostPosted: Sun Jun 16, 2013 7:02 pm
by Antonio Linares
Pablo,

Prueba a construir el ejemplo login.prg

Aqui acabo de probarlo y compila bien

build.bat login

Re: FiveWeb Error en los botones

PostPosted: Tue Jun 18, 2013 3:32 am
by jnavas
Antonio
Probé con login.prg y no compila, incluso copie fiveweb\include en fiveweb\samples,
seguire intentando debo seguir buscando en include

Re: FiveWeb Error en los botones

PostPosted: Tue Jun 18, 2013 4:03 am
by jnavas
Antonio

Ya encontre la incidencia, el comando button requiere
@ x,y BUTTON oBtn PROMPT "Texto"



#include "FiveWeb.ch"

function Main()

local oDlg, oImg,oBtn1,oBtn2
local oGetName, cUserName := Space( 30 )
local oGetPass, cPassword := ""

DEFINE DIALOG oDlg TITLE "FiveWeb Login" SIZE 650, 400


@ 30, 30 IMAGE oImg FILENAME "../images/user.png" SIZE 120, 120 OF oDlg

@ 69, 190 SAY "User" SIZE 110, 40 OF oDlg

@ 124, 190 SAY "Password" SIZE 110, 40 OF oDlg

@ 66, 315 GET oGetName VAR cUserName SIZE 300, 40 OF oDlg

@ 124, 315 GET oGetPass VAR cPassword SIZE 300, 40 OF oDlg PASSWORD


@ 265, 189 BUTTON oBtn1 PROMPT "Ok" SIZE 110, 40 OF oDlg ;
ACTION MsgInfo( oGetName.value + CRLF + oGetPass.value )


// executed in the client in javascript


@ 265, 335 BUTTON oBtn2 PROMPT "Cancel" SIZE 110, 40 OF oDlg ;
ACTION ( oDlg:End() ) // Executed in the server in advance

ACTIVATE DIALOG oDlg

return nil

Re: FiveWeb Error en los botones

PostPosted: Tue Jun 18, 2013 7:41 am
by jnavas
Lectura de Variables

Antonio,

Utilizando el programa login y el ejemplo de otto, cuando leo las variables del formulario y las envió como parámetro se muestra en la linea de comando del explorador, es decir, si solicita la clave, esta es visualizada.
Alguna manera de tener estas variables en metodo GET o POST?




@ 66, 315 GET oGetName VAR cUserName SIZE 300, 40 OF oDlg

@ 124, 315 GET oGetPass VAR cPassword SIZE 300, 40 OF oDlg PASSWORD


@ 265, 189 BUTTON oBtn1 PROMPT "Ok" SIZE 110, 40 OF oDlg ;
ACTION document.location = "login.exe?MYFUNC:" + ;
document.getElementById( "oGetName" ).value + ":" + ;
document.getElementById( "oGetPass" ).value




@ 265, 189 BUTTON oBtn1 PROMPT "Ok" SIZE 110, 40 OF oDlg ;
ACTION document.location = "login.exe?MYFUNC:" + ;
document.getElementById( "oGetName" ).value + ":" + ;
document.getElementById( "oGetPass" ).value