Antonio Linares wrote:Kokoo,
There is something important to learn about FiveWeb:
When you execute your code, xbase is translated into whatever and works
![Smile :-)](./images/smilies/icon_smile.gif)
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
![Smile :-)](./images/smilies/icon_smile.gif)
Instead of your code, try:
MsgInfo( oGET.Value )
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.
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)