Cr07&Lm10
15th June 2015, 20:28
Hello Expert,
I have used the statement "seq.open.dialog.local" in a session. The session is working fine when it is being executed through Worktop. But, while this session is getting executed from WebUI it is giving the error "The function is not supported by LN UI. seq.open.dialog.local". May you please let me know
1. what is the equivalent function for the same in WebUI.
2. If LN needs to be executed both from Worktop and WebUI, then how it can be handled
Thanks & Regards
Cr
andreas.toepper
16th June 2015, 09:27
Basically there is no local BW-client running on your PC when using webui. So LN can't access local files for reading or writing.
But there are two copy-functions, you can use instead: server2client(..) and client2server(..)
So you can copy the file from the client onto the server and Access it with seq.open() on the server.
I’m using this way to access local files in my programs. The path and filename is given in “filepath”. It will work in worktop and webui (but not in LNUI).
tmp.file = bse.tmp.dir$()&"/importlist.txt"
client2server(filepath, tmp.file, true, false, false)
|Access copied tmp file on server:
file.id = seq.open(tmp.file, "rt")
It may be better to create an unique tmp-filename with create.tmp.file$(..) and perform some additional error-checks, when the program will be used on regular basis.
vamsi_gujjula
16th June 2015, 15:04
the function you mentioned is not support in LNUI , nor is server2client , client2server
below function is used for LNUI
#include <bic_desktop>
function long client.upload.file (string destination [, ref string client.filename] [, ref string mime.type])
you might also want to look at these:
client.download.file ()
client.add.download.file ()
client.prepare.download ()
client.show.file ()
client.start.download ()
client.upload.file ()
client.upload.files ()
client.delete.upload.file.object ()
client.get.media.type ()
client.get.upload.file ()
client.upload.filecount ()
tc.is.html.ui()
get.ui.mode()
Cr07&Lm10
16th June 2015, 18:37
Thank you very much. I have found that