I'm trying to get my head around the mobileControl*** stuff for a "browser" (under IOS - but same for Android eventually!) and I can create the native "browser" object nicely (in the Simulator - haven't tried actual iPad yet), but I cannot persuade it to load a bundled html file I have added to the app.
Stages and testing done so far...:
Code: Select all
mobileControlCreate "browser"
mobileControlSet "rect","10,10,600,600"
mobileControlSet "visible","true"
mobileControlSet "backgroundcolor","white"
I tested it with a simple mobileControl command to issue an Alert - works perfectly with that. I send a url for an http:///www.runrev.com - and that displays too.
Now I try to access a very simple html (contains a body with "Hello Dave" in it!!) called "test.html" which I have added to the app bundle via the add files part of the standalone creation stuff.
I can see the file exists (in the Simulator) via setting the defaultFolder to the special folder "engine" and sending "the files" into a display field - the html file shows in there fine.
But, when I do a mobileControlSet "url", "test.html" I get nothing.
I have also tried mobileControlDo "load","test.html","" and various variants of that! (with which I can see the 3rd field appearing as text in the browser - which is not actually loading the file)
I've tried all the various special folders, setting the defaultfolder each time and even trying different filename structures - eg. "./test.html", etc.
I cannot seem to simply display the local hml file in the browser object. I must be missing something or just not understanding the Docs or something, 'cos this seems to be such a simple concept for a browser to load a local file.
Please can someone help here?
Please...

Cheers,
Dave
PS, if there is some info on how one should setup a local file structure (within the app) containing images, js, css, etc for local display, then I would be really grateful. I don't mean how to write html, etc, (I do that all day long!!) but more what works in terms of html access for images via the local browser - eg paths, etc. And I do understand that this is not a server situation - only 'file' access level (not local 'http')- like a local copy of an html doc.