Hi all!
I'm trying to get data from My_file.txt , which is in the same folder as my Rev stack. Here's what I wrote:
on mouseUp
put URL "file: My_file.txt" into theFile
put theFile into field "heresMyFile"
end mouseUp
Field "heresMyFile" comes up empty. When I tried to debug by saying:
put URL "My_file.txt" into theFile
put the first word of "theFile" into message
Message gives me empty, although I have opened My_file.txt and seen that it does indeed contain text.
Since it is in the same folder as my Rev project, I didn't think I had to state the entire file path, so I'm not sure what is wrong!
I'm grateful for any help! Thanks!
"Put URL" command can't find my file?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
The first thing I spotted was a space between the colon and the name of your file - but I think that's just a typo when copying to the forums?
Other than that, the fact that the file is in the same folder as the project is no guarantee that the engine will start looking in that folder - you will have to set the defaultFolder global property to that folder before using a relative file URL.
Jan Schenkel.
Other than that, the fact that the file is in the same folder as the project is no guarantee that the engine will start looking in that folder - you will have to set the defaultFolder global property to that folder before using a relative file URL.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Thank You!
Thank you! I think I have both of those problems going on.
I didn't know about having to set the default folder!
I didn't know about having to set the default folder!