Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Almost completely new to RunRev, but liking it so far. However, I've been scrolling through the tutorials and there doesn't seem to be one that relates to my issue.
I have a .txt file hosted at "http://dl.dropbox.com/u/15530379/newspost.txt" and would like to retrieve the text inside it and place it in a scrolling field (or, alternatively, into a Label).
I assumed something like this would suffice, but as I'm a -complete- novice, I'm probably way off.
The code works perfectly when running from a MouseDown event on a test button, but when moving it to the Startup event for the main card (and the only card that isn't used for icon/image/video storage) it seems to cease functioning. I thought it was an issue with the entire script, but it seems like the OS print works fine. It's not exactly the most complicated script in the world which just confuses me further, because there's not a whole lot to go wrong (unless I'm mistaking how the on startup event works for cards)?
on startup
/*
+Get newspost.txt and output to newspost field
+Get latestver.txt and output to latestver field
-Get currentver.txt from $curfolder$, output to currentver field
*/
put URL "http://dl.dropbox.com/u/15530379/Uprising/Launcher/newspost.txt" into field "newspost"
put URL "http://dl.dropbox.com/u/15530397/Uprising/Launcher/latestver.txt" into field "latestver"
/* put _ into field "currentver"*/
set the loc of this stack to the screenLoc
/* Check OS and output to Label for installer reference folders, just in case installer check fails.*/
if the platform is "MacOS"\
then put "Macintosh" into field "ostype"
else if the platform is "Win32"\
then put "Windows" into field "ostype"
else if the platform is "Linux"\
then put "Linux" into field "ostype"
end startup
Hi Malteser,
try to put your code into a on openstack handler and provide a full path to the fields. Like "put something into field "newsPost" of card "news"
StartUp might be a little early in the chain of events.
regards
Bernd