Paths in Mac standalone headache

David V Glasgow dvglasgow at gmail.com
Sun Oct 4 06:37:55 EDT 2015


In my apps openstack script I setup a path for saving and getting results using specialfolderpath(“documents”), and put that in a global gresultspath

I use that to access results in a couple of places within substacks, using a fairly standard script.  This works fine in development, and fine on Windows standalone.

In all cases on the Mac the results files are never loaded, because the path isn’t properly set.  I bunged in a debugging field to see what is happening:

on mouseUp
   global gresultspath
   put the defaultfolder into toldefault
   set the defaultfolder to gresultspath
   
   --   whats going on with the results path?
   put  “Was  " & toldefault & return & “Should be  " & gresultspath & return & "Is  " & the defaultfolder into field  “whatsgoingon"
   
   put the files into ttemp
   filter ttemp without ".DS_Store"
   filter ttemp without "template"
   put ttemp into field "resultsfiles"
   set the defaultfolder to toldefault
end mouseUp

 On Windows the path is set as expected.  On Mac, wherever I move the app to, the default folder doesn’t get set, and the files which are put into ttemp are any within the folder containing the app.  So, the debugging field reports:

Was  = correct path
Should be  = correct path 
Is  = path to the standalone

 I am using 6.7.4 on Snow Leopard

Any suggestions?



Best wishes,

David Glasgow 





More information about the use-livecode mailing list