[Solved] Cordova is missing in Files sample


Paolo Lops
Hi David,i have a problem with the function fileread also with your example.can you help me?FileRead "applicationDirectory" "/www/app/files/Avatar.html" "ErrorCallback" "SuccessCallback"Error: "'cordova' non è definito" - Line: 345 - Char: 13 - Code: 0 - Url: http://127.0.0.1:9999/app/scripts/app.js

DecSoft

Hello Paolo,

The error message is more or less obvious this time: "cordova" is not defined, in other words, can't be used. Certainly what happen i that the Files sample requires to compile the app with Apache Cordova first. In fact we only can write files from an Cordova's compiled app, that is, our apps cannot read files if they run in a browser, for example, which is good (just imagine than an webpage can read your own files...).



Paolo Lops

David,

if i have need to  use a variable with a big anount of data like this and programmatically set an htmlcontrol ... how i can do?


Paolo Lops

i have found it....

LoadVariables "app/files/variables.txt"


DecSoft

Hello Paolo,

LoadVariables, as you said; also place that HTML inside the HTML control and use just some variables for some specific content; a sole variable in the HTML control to be feeded by the response of an HttpClient control. Using pure Javascript in order to feed the HTML control by their ID (which is their name in App Builder),... and may others ways too... :-)

However, apparently you want to shown an modal dialog... please, remember we have the "ShowDialog" action to shown app's view as dialogs. And we have also the "MessageBox" action, which is also very powerful, as you can see in the MessageBox sample.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.