Why doesn't this script work?
Stephen Paul McNutt
stephenmcnutt at mac.com
Sun Nov 13 22:14:18 EST 2005
Here's a script I use to set the defaultFolder property for a
standalone. The part for OSX works perfectly, but the part for Win32
doesn't. I've placed all those answer commands in there to check
variable and property values as I go.
local ldefaultFolder
if the environment <> "development" then
answer the platform
answer the defaultFolder
if the platform = "MacOS" then
put defaultFolder into ldefaultFolder
put "/Classroom Quizshow.app/Contents/MacOS" after
ldefaultFolder
set the defaultFolder to ldefaultFolder
answer the defaultFolder
end if
if the platform = "Win32" then
put defaultFolder into ldefaultFolder
put "/CQdata" after ldefaultFolder
answer ldefaultFolder
set the defaultFolder to ldefaultFolder
answer the defaultFolder
end if
end if
Note that the answer command 5 lines from the bottom returns the name
of the correct folder I'm trying to make the defaultFolder, but the
answer command 3 lines from the bottom returns the same thing minus "/
CQdata". What the heck? I even copied "ldefaultFolder" in the 5th
line from the bottom and pasted it over the same word in the 4th line
from the bottom just to make doubly sure I didn't have a typo.
Again, the MacOS part works as expected and produced the proper
defaultFolder property value for the OS X standalone.
More information about the use-livecode
mailing list