Release: 8.0 DP4... also, HTML5

Bob Warren bobwarren at howsoft.com
Tue Sep 1 21:51:53 EDT 2015


Fraser and Rolf wrote:

> I am asking this because I could not get it to work form my Desktop OS
> using it without a WebServer.

Some browsers (Chrome in particular, but all of them to some degree) have restrictive policies in place that prevent JavaScript (like the LiveCode engine) from accessing the local file system. There?s no way to work around this - it is a security feature to stop web apps from stealing your data. The HTML5 deployment guide has a section on how to use Python to run a local web server.

Fraser

Sorry I did not explain my question well enough. What I would like to know is,
can the -get URL- command be tested/used form the desktop at all ?

Without any Server !

I tried and nothing happened !


Cheers
Rolf

-----------------------------------------------------------------
-----------------------------------------------------------------

Please allow me to elucidate a little on the question of file I-O in the local file system using Javascript, in the hope that it will be useful to some of you, or that it might in some way influence what is/is not implemented in LC8:

1. A Javascript (or JQuery script) is able to upload data from a file directly from the local file system, without operator intervention, AS LONG AS IT IS AN XML file.

2. There exists an "xmlWriter.js", but I haven't managed to get it to work yet!

3. If operator intervention is allowed, then dialogues (like LC "answer file" dialogues) for uploading/downloading files from anywhere from/to the local file system can be achieved in 2 ways that I know of:

(a) Using "Uploadify" and "Downloadify". (Require Flash) A bit of a pain in the elbow to embed in your script though.
(b) Using HTML5. (Flash not required). Easier to embed, but not quite so direct in their usage of LC-style dialogues.

--------------------

If anyone wants a demo of the XML upload, just drop me a line and I will send it to you.
If anyone knows how to get xmlWriter to work, I'd be grateful for a demo script if you have one.
For examples of Uploadify and Downloadify, see the 4 browser apps at:

http://www.howsoft.com/browserapps/

For an example of local file I-O using HTML5, see my unpublished app at:

http://www.howsoft.com/browserapps/quickinfo/

For information on embedding, just look at the script in the "developers" menu of your browser. (Sorry about the "spaghetti coding: my GGgrandmother was an Italian!)

I would like to emphasize that all the above concerns file I-O on the local file system, NOT on a server, regardless of whether the script itself is on the Internet or on the local machine.

For quite a long time, I have been trying to do everything in Javascript that I am able to do in LC on the desktop.
It ain't easy!

Regards,

Bob Warren







More information about the use-livecode mailing list