klaus at major-k.de
Thu Nov 6 13:04:24 CST 2003
> I've got a file "Gen.html" on my desktop (OS X) along with my RunRev
> The following script will open "Gen.html" while in Runtime but the
> Standalone does not work:
> on mouseUp
> set the itemDelimiter to "/"
> put (item 1 to -2 of the effective fileName of this stack)&"/" into
> get "file:"&myFolderName&"gen.html"
> revGoURL it --- This works in Runtime but not in standalone
> end mouseUp
> I do have Internet Script Libraries checked in the Distribution
> Builder. Can anyone help?
Sounds like a path problem...
On OS X things are a little different than on other platforms ;-)
When in dev-mode "item 1 to -2 of the effective fileName of this stack"
what you exspect...
But when you build a standalone this will return something what you
don't exspect... (And now to something completely different! :-)
You have to see it to believe it ;-)
Control-Click your standalone and select "Show contents" (or something
Then this folder will open and reveal another folder "Contents"...
Another doubleclick will reveal 2 more folders and some files...
Open the folder "MacOS" and you will find a file named "Revolution"...
Now THIS is your original stack you build the standalone from, with the
wrapped around it...
And THIS FOLDER (Appname.app/Contents/MacOS/)!!! is what
"item 1 to -2 of the effective fileName of this stack"
will return in an OS X standalone...
So what can you do?
In this case "the directory" will be the right place :-)
A.k.a "the defaultfolder" or "the folder"
Try this (i do it all the time and it works fine :-D)
set the itemDelimiter to "/"
if the environment = "development" then
put (item 1 to -2 of the effective fileName of this stack)&"/"
##no need to specify a folder, since we ARE in the correct folder
revGoURL it --- This works in Runtime but not in standalone
See the RR dictionary for "environment"
Hope that helps...
> Thanks, Roger
klaus at major-k.de
More information about the use-livecode