Would this help you in setting the defaultfolder

on preOpenStack
   set itemDel to "/" 
   set the defaultfolder to item 1 to -2 of (the effective fileName of this 
stack)
end preOpenStack


> From: dvglas...@gmail.com
> Subject: Paths in Mac standalone headache
> Date: Sun, 4 Oct 2015 11:37:55 +0100
> To: use-livecode@lists.runrev.com
> 
> 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 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
                                          
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to