Page 1 of 1

import failed

Posted: Wed Feb 02, 2011 6:50 pm
by fre
hallo,
i want to import data from a textfile.
in livecode and in the simulator everything works fine with the followig script

Code: Select all

put URL("file:/Users/myname/Sites/hyb.txt") into inFile
when i create a app for the iphone, i change the code to the following and i do copy the file hyb.txt under Standalone Application Settings / Copy Files.

Code: Select all

put URL("file:hyb.txt") into inFile
i only have a T-Mobile G3 (no iphone) and there the import does not work.

can anybody help me find the error in my work?

best
fred

Re: import failed

Posted: Wed Feb 02, 2011 7:40 pm
by Klaus
Hi Fred,

try this:
...
put URL("file:" & specialfolderpath("engine") & "/hyb.txt") into inFile
...

specialfolderpath("engine") is the folder where the standalonebuilder will copy your files and folders to!
The same that holds the iOS standalone, thus the name :)


Best

Klaus

Re: import failed

Posted: Thu Feb 03, 2011 12:38 pm
by fre
thank you klaus,
i will try this.

best regards
fred.