FiveWeb question
FiveWeb question
Hello Antonio,
is FiveWeb Syntax casesensitiv.
MsgInfo is working
@ 120, 160 BUTTON "One" SIZE 80, 50 OF oDlg ACTION MsgInfo( "test" )
msginfo compiles but then when you click on the button the button does not show a box.
@ 120, 160 BUTTON "One" SIZE 80, 50 OF oDlg ACTION msginfo( "test" )
Best regards,
Otto
is FiveWeb Syntax casesensitiv.
MsgInfo is working
@ 120, 160 BUTTON "One" SIZE 80, 50 OF oDlg ACTION MsgInfo( "test" )
msginfo compiles but then when you click on the button the button does not show a box.
@ 120, 160 BUTTON "One" SIZE 80, 50 OF oDlg ACTION msginfo( "test" )
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Otto,
Local actions (on the client side) are performed using javascript and javascript is case sensitive
Local actions (on the client side) are performed using javascript and javascript is case sensitive
Re: FiveWeb question
Hello Antonio,
where do you suggest to look up the right spelling.
As you get no error this is for a beginner a pitfall.
Thank you for your work on FIVEWEB.
I decided yesterday to re-write our online booking with FiveWeb.
Best regards,
Otto
where do you suggest to look up the right spelling.
As you get no error this is for a beginner a pitfall.
Thank you for your work on FIVEWEB.
I decided yesterday to re-write our online booking with FiveWeb.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Otto,
The best tool that I use to check javascript errors, etc. is Chrome itself, as it has a wonderful sort of debugger/inspector that is fantastic!
Just right click on a web page from Chrome and select "inspect element" and there you have a great "Console" option where you see javascript errors, etc.
Besides that, the web is plenty of javascript docs, just google for javascript "something" and you will get tons of info
I will help you with FiveWeb as much as I can. Its not a perfect tool yet but with the help of FiveWeb users it will grow and become a great tool like FiveWin is
The best tool that I use to check javascript errors, etc. is Chrome itself, as it has a wonderful sort of debugger/inspector that is fantastic!
Just right click on a web page from Chrome and select "inspect element" and there you have a great "Console" option where you see javascript errors, etc.
Besides that, the web is plenty of javascript docs, just google for javascript "something" and you will get tons of info
I will help you with FiveWeb as much as I can. Its not a perfect tool yet but with the help of FiveWeb users it will grow and become a great tool like FiveWin is
Re: FiveWeb question
Hello Antonio,
Otto.prg add data
If there is a space on the left or between the names the program errors out.
I made the tests with Chrome.
Best regards,
Otto
Otto.prg add data
If there is a space on the left or between the names the program errors out.
I made the tests with Chrome.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Otto,
I think I know whats going on: When you call your EXE with spaces for params, then the app is receiving several params:
function Main( cParam1, cParam2, ... )
If they are all together, then we only get:
function Main( cParams )
thats where the error comes from. We could modify FiveWeb to detect and use both ways
I think I know whats going on: When you call your EXE with spaces for params, then the app is receiving several params:
function Main( cParam1, cParam2, ... )
If they are all together, then we only get:
function Main( cParams )
thats where the error comes from. We could modify FiveWeb to detect and use both ways
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
Re: FiveWeb question
hi Antonio :
I have a question for Fiveweb.
After edit value of tget , can't display new value.
Anything I miss ?
I have a question for Fiveweb.
After edit value of tget , can't display new value.
Anything I miss ?
Change Value 'TEST1234' to 'TEST5678, msginfo() still display 'TEST1234' .#include "FiveWeb.ch"
function Main()
local oDlg, cTEST:="TEST1234 ",oGET
DEFINE DIALOG oDlg TITLE "Hello FiveWeb" SIZE 600, 400
@ 20, 20 GET oGET VAR cTEST OF oDlg SIZE 300, 40
@ 120, 370 BUTTON "ok" SIZE 120, 50 OF oDlg ACTION ( msginfo( cTEST ) ,oDlg:END() )
ACTIVATE DIALOG oDlg
return nil
-------------
best regards
kokoo Kao
best regards
kokoo Kao
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Kokoo,
There is something important to learn about FiveWeb:
When you execute your code, xbase is translated into whatever and works but you are no longer in your PRG execution. It happened, then you got your result and you are working locally, using javascript. So think about this: where is the variable defined ? In the PRG. And that code was already processed. Similar like when we create a dialog and run it as non modal. The variables are gone, out of scope
Instead of your code, try:
MsgInfo( oGET.Value )
There is something important to learn about FiveWeb:
When you execute your code, xbase is translated into whatever and works but you are no longer in your PRG execution. It happened, then you got your result and you are working locally, using javascript. So think about this: where is the variable defined ? In the PRG. And that code was already processed. Similar like when we create a dialog and run it as non modal. The variables are gone, out of scope
Instead of your code, try:
MsgInfo( oGET.Value )
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
Re: FiveWeb question
Hi Antonio:
Thank you for Explanation about Fiveweb.
Tried: msginfo(oGet.Value) ==> compiler error
Tried: msginfo(oGet:nValue) ==> Return Null
Thank you for Explanation about Fiveweb.
Tried: msginfo(oGet.Value) ==> compiler error
Tried: msginfo(oGet:nValue) ==> Return Null
-------------
best regards
kokoo Kao
best regards
kokoo Kao
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Javascript is case sensitive, so you have to write it exactly like this:
MsgInfo( oGet.value )
MsgInfo( oGet.value )
Re: FiveWeb question
Yes, this is a very good explanation of what kind of problems we are dealing with, when trying to use the special libraries to design web application.Antonio Linares wrote:Kokoo,
There is something important to learn about FiveWeb:
When you execute your code, xbase is translated into whatever and works but you are no longer in your PRG execution. It happened, then you got your result and you are working locally, using javascript. So think about this: where is the variable defined ? In the PRG. And that code was already processed. Similar like when we create a dialog and run it as non modal. The variables are gone, out of scope
Instead of your code, try:
MsgInfo( oGET.Value )
Practically, each dialog we create and show on the screen, we can imagine/consider as having one HTML with a FORM in it. So once the dialog is shown on the screen, it's like we show the HTML with a form and we cannot go back to this dialog, unless we call the same function again. In this case it is not recursive call like in ordinary desktop application.
From the same reason we cannot see PRIVATE defined variable in a lower function - if we have function:
FUNCTION One()
PRIVATE abc
DEFINE DIALOG oDlg
@ 1,1 GET oGet VAR abc OF oDlg
@ 2,1 BUTTON oBut ACTION checkit()
ACTIVATE DIALOG oDlg
// We are actually here and returned to the calling function!!!!!!!
RETURN(NIL)
FUNCTION Checkit()
? abc // undefined!
RETURN(NIL)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Boris,
Anyhow we can send info from the client to the server too, so we could update the variable and send it back to the server, but we need to manage "sessions" for that. Something that we have not implemented yet.
Anyhow we can send info from the client to the server too, so we could update the variable and send it back to the server, but we need to manage "sessions" for that. Something that we have not implemented yet.
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
Re: FiveWeb question
HI Antonio:
MsgInfo( oGET.Value )
Compiler error :
MsgInfo( oGET.Value )
Compiler error :
Compiling...
testget.prg(15) Error E0030 Syntax error "syntax error at '.'"
Harbour 3.2.0dev (Rev. 18805)
Copyright (c) 1999-2013, http://harbour-project.org/
Compiling 'testget.prg'...
1 error
No code generated.
* Compile errors *
-------------
best regards
kokoo Kao
best regards
kokoo Kao
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FiveWeb question
Kokko,
You have to call it from the ACTION of a control
You have to call it from the ACTION of a control
Re: FiveWeb question
You're right Antonio.Antonio Linares wrote:Boris,
Anyhow we can send info from the client to the server too, so we could update the variable and send it back to the server, but we need to manage "sessions" for that. Something that we have not implemented yet.
But this would require to change the programming logic. In such case we must relay on pure client/server logic to not refresh the entire user's screen every time we need the info about some variable or we change and save variables. On the server there must be an EXE which will receive the requests and deliver back the updated info to the user's screen (something like Data browse in Flex is doing)
Years ago I designed some app (licensing system) which communicates with some EXE running on server and sending back the new info after the request has been managed. Socket class.
Anyway, we all are eager to see the results for FiveWeb you are working on.
Speed it up Antonio, we need it