import failed

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

import failed

Post by fre » Wed Feb 02, 2011 6:50 pm

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

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: import failed

Post by Klaus » Wed Feb 02, 2011 7:40 pm

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

fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

Re: import failed

Post by fre » Thu Feb 03, 2011 12:38 pm

thank you klaus,
i will try this.

best regards
fred.

Post Reply