Where's the file?

Tim Ponn alptex2 at orwell.net
Tue Dec 23 09:28:29 EST 2008


Hi Klaus,

> No, but your files can be found INSIDE of the application bundle :-)
>
> "the path of the folder containing the stack" is this one in a  
> standalone on OS X:
> ../Name_of_your_standalone.app/Contents/MacOS/
>
> Your text files can be found in this folder!
> Right-Click on your standalone and select "Show contents" to check  
> it out
>>

Well,  I guess you can now tell that I am a relative newbie at  
OSX...only a couple years into it.  Having lived thru apple's change  
in system 7 years ago, I am VERY cautious about OS change.  So much of  
my perspective on OS X is still pre-OS X.

Thanks for the education!


> You will have to take this into account when initializing your  
> global variable:
>
> ...
> put the filename of stack "Mainstack a.k.a. the standalone" into  
> tFilename
> set itemdel to "/"
> if the platform = "MacOS" then
>   delete item -4 to -1 of tFilename
> else
>  delete item -1 of tFilename
> end if
>
> global appFolderPath
> put tFilename & "/" into appFolderPath
>
> You get the picture :-)



Yes....I do something like...

global appFolderPath

on openStack
   set the itemDelimiter to "/"
   put (item 1 to -2 of the effective filename of this stack)&"/" into  
appFolderPath
   get url ("file:"&appFolderPath&"AllUserData.txt")
   if it is empty then
     answer "Sorry, I can't find a user data file!" with "Oops!"
     restoreUserData
     get url ("file:"&appFolderPath&"AllUserData.txt")
   end if
   ...
   ...
   ...
end openStack

Eventually, I'll add in the other platforms


Thanks again!


Best Regards,

Timothy R. Ponn







More information about the use-livecode mailing list