FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour FiveWeb Error en los botones
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM

FiveWeb Error en los botones

Posted: Sun Jun 16, 2013 01:14 PM
Hola Antonio,

Cuando trato de compilar me da este error
Code (fw): Select all Collapse
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 (fw): Select all Collapse
   @ 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
Saludos,



Pablo Alberto Vidal

/*

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

Harbour 3.2.0, Fivewin 17.02, BCC7

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

*/
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: FiveWeb Error en los botones

Posted: Sun Jun 16, 2013 01:41 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM

Re: FiveWeb Error en los botones

Posted: Sun Jun 16, 2013 04:09 PM
Antonio, le quite el prompt y sigue igual
Saludos,



Pablo Alberto Vidal

/*

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

Harbour 3.2.0, Fivewin 17.02, BCC7

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

*/
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: FiveWeb Error en los botones

Posted: Sun Jun 16, 2013 07:02 PM

Pablo,

Prueba a construir el ejemplo login.prg

Aqui acabo de probarlo y compila bien

build.bat login

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM

Re: FiveWeb Error en los botones

Posted: Tue Jun 18, 2013 03:32 AM

Antonio
Probé con login.prg y no compila, incluso copie fiveweb\include en fiveweb\samples,
seguire intentando debo seguir buscando en include

Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM

Re: FiveWeb Error en los botones

Posted: Tue Jun 18, 2013 04:03 AM
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
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM

Re: FiveWeb Error en los botones

Posted: Tue Jun 18, 2013 07:41 AM

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

Continue the discussion