Loading local html
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
Loading local html
Can't get my local html to load.
I've set the default MobGUI URL to [specialFolderPath]/dream/dream.html but nothing shows up in the simulator. There isn't a lot of documentation for us beginners on the specialFolderPath... I'm on LC 6.6.0 and iOS Sim 7.1
I've set the default MobGUI URL to [specialFolderPath]/dream/dream.html but nothing shows up in the simulator. There isn't a lot of documentation for us beginners on the specialFolderPath... I'm on LC 6.6.0 and iOS Sim 7.1
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Loading local html
Hi roddy,
There are only a few specialFolderPath's and they are listed in the dictionary.
You cannot make them up yourself.
You would have your html file in the Copy Files tab of the standalone builder so it's location is specialFolderPath("engine"),if it's just a static page you can leave it there. Otherwise move it to specialFolderPath("documents").
Simon
There are only a few specialFolderPath's and they are listed in the dictionary.
You cannot make them up yourself.
You would have your html file in the Copy Files tab of the standalone builder so it's location is specialFolderPath("engine"),if it's just a static page you can leave it there. Otherwise move it to specialFolderPath("documents").
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Loading local html
Hi Simon,
I have my local content "/dream/dream.html" in my documents, home and desktop folders as well as in the folder with my LC stack. I've added the folder in my Copy Files tab in standalone settings.
The MobGUI documentations says:
"Entering the URL [engine]/LocalContent/Index.html would load the local Index.html file from the LocalContent folder included with the app."
I've tried all of the below in the MobGUI default URL field for my browser:
file://[specialFolderPath]/dream/dream.html
file://[documents]/dream/dream.html
file://[engine]/dream/dream.html
file://[home]/dream/dream.html
Roddy
I have my local content "/dream/dream.html" in my documents, home and desktop folders as well as in the folder with my LC stack. I've added the folder in my Copy Files tab in standalone settings.
The MobGUI documentations says:
"Entering the URL [engine]/LocalContent/Index.html would load the local Index.html file from the LocalContent folder included with the app."
I've tried all of the below in the MobGUI default URL field for my browser:
file://[specialFolderPath]/dream/dream.html
file://[documents]/dream/dream.html
file://[engine]/dream/dream.html
file://[home]/dream/dream.html
Roddy
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Loading local html
Hi Roddy,
You are missing specialFolderPath
it is
("file:" & specialFolderPath("engine") & "/dream/dream.html")
To make it easy to test just copy the file "dream.html" not the entire directory structure.
("file:" & specialFolderPath("engine") & "/dream.html")
Once you get that working then add the folder structure.
In the dictionary it's like this
put url ("file:" & specialFolderPath("engine") & slash & "foo.txt") into tFileContents
that "slash" is the same as "/"
Simon
You are missing specialFolderPath
it is
("file:" & specialFolderPath("engine") & "/dream/dream.html")
To make it easy to test just copy the file "dream.html" not the entire directory structure.
("file:" & specialFolderPath("engine") & "/dream.html")
Once you get that working then add the folder structure.
In the dictionary it's like this
put url ("file:" & specialFolderPath("engine") & slash & "foo.txt") into tFileContents
that "slash" is the same as "/"
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Loading local html
Can't get it to work. I don't need the start and end quotes for the MobGUI URL field, correct?
file:" & specialFolderPath("engine") & "/dream/dream.html
Is there something else I should have set-up in the MobGUI browser script first?
file:" & specialFolderPath("engine") & "/dream/dream.html
Is there something else I should have set-up in the MobGUI browser script first?
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Loading local html
Here from the mobgui docs
mobileControlSet "MyBrowser", "url", "file://" & specialFolderPath("engine") & "/HTML/Index.html"
Simon
Edit: mobileControlSet "MyBrowser", "url", "file:" & specialFolderPath("engine") & "/HTML/Index.html"
works as well.
mobileControlSet "MyBrowser", "url", "file://" & specialFolderPath("engine") & "/HTML/Index.html"
Simon
Edit: mobileControlSet "MyBrowser", "url", "file:" & specialFolderPath("engine") & "/HTML/Index.html"
works as well.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Loading local html
Thanks for your time on this...
Using the MobGUI plug-in, I didn't think I needed to use any other commands other than the default URL field on the plug-in panel. I'll have to play around with mobileControlSet.
Roddy
Using the MobGUI plug-in, I didn't think I needed to use any other commands other than the default URL field on the plug-in panel. I'll have to play around with mobileControlSet.
Roddy