sa_sch
28th March 2012, 11:54
Hi all,
we have a session where we import ascii data out of a local file. The path of this file has to be filled by the user, therefore he has two possibilities. The session contains a form field where he can enter the full path of the local file and a button which opens a dialog box to select a local file.
In Worktop the users are used to enter the drive like “V:\” into the form field and press the button to open the dialog box in this folder. Everything fine. But now we tested it in Webtop. Although the function behind the button starts the dialog box, it doesn’t open the entered path.
Here is the code of the external function behind the button:
function extern browse.local()
{
long ret
domain tcmcs.str100 temp.path
if isspace(f.path) then
f.path = "c:\temp"
endif
ret = seq.open.dialog.local(false,"", f.path,"*.*",temp.path)
if ret = 1 or ret = 0 then
f.path = strip$(temp.path)
endif
}
While additional tests we found 2 problems:
- The function doesn’t recognize that the user has entered a value into the form field (extern variable f.path)
- Even after setting “c:\temp” in the variable f.path the seq.open.dialog.local() function doesn’t open this path. Instead it opens a default folder.
How do we have to change the code that this functionality also runs in Webtop? Has anybody an idea?
Thanks in advance and regards
sa_sch
we have a session where we import ascii data out of a local file. The path of this file has to be filled by the user, therefore he has two possibilities. The session contains a form field where he can enter the full path of the local file and a button which opens a dialog box to select a local file.
In Worktop the users are used to enter the drive like “V:\” into the form field and press the button to open the dialog box in this folder. Everything fine. But now we tested it in Webtop. Although the function behind the button starts the dialog box, it doesn’t open the entered path.
Here is the code of the external function behind the button:
function extern browse.local()
{
long ret
domain tcmcs.str100 temp.path
if isspace(f.path) then
f.path = "c:\temp"
endif
ret = seq.open.dialog.local(false,"", f.path,"*.*",temp.path)
if ret = 1 or ret = 0 then
f.path = strip$(temp.path)
endif
}
While additional tests we found 2 problems:
- The function doesn’t recognize that the user has entered a value into the form field (extern variable f.path)
- Even after setting “c:\temp” in the variable f.path the seq.open.dialog.local() function doesn’t open this path. Instead it opens a default folder.
How do we have to change the code that this functionality also runs in Webtop? Has anybody an idea?
Thanks in advance and regards
sa_sch