Hi guys,
after a while away I am using the current version and have found the stand alone app to be smoother and a bit faster than 2014r2.1 version.
This came up straight away
when you download a file from the site I do this - if there is a better way please say so.
In the MOUSEDOWN event of the download button I put this
Session.ConfirmMessage =""
This is so the user doesn’t get a warning message about leaving the page when they file is being sent to them
the action event creates the file for the download and it is downloaded.
Part of creating the file may or may not involve calls to methods held in session as well.
I.e. a=session.calc(“12*6+1”)
at the end it fires the FileDownloaded method
textfile.ondownloaded = WeakAddressOf FileDownloaded
In the file downloaded method we set the ConfirmMessage back to what we want.
session.ConfirmMessage =“Hi “+session.user.field(“lFullName”).stringValue+” could you please use the Log Out button to close the cloud rather than closing the window.”
The problem I find is that SESSION is sometimes now NIL.
This crashes the app and the file doesn’t download.
I did try the old DIM ses as session = session however this also returns ses=NIL
If I put
IF SESSION <>NIL THEN session.ConfirmMessage ="Hi “+session.user.field(“lFullName”).stringValue+” co…
it works fine however if the users closes the window they don’t get the warning message.
Any ideas how it should be done?
Thanks
Damon