Why doesn't this script work?

J. Landman Gay jacque at hyperactivesw.com
Sun Nov 13 23:52:59 EST 2005


Stephen Paul McNutt wrote:
> 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.


I don't see anything wrong with the script. Does the "/CQData" folder 
already exist? If not, you'll have to create it first.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list