find file dialog box
Posted: Wed Feb 18, 2015 11:25 pm
				
				In Supercard all you need to to is type Open proj "xxx" and a dialog box opens so you can locate the project, but how is this done in Livecode?
Thanks,
David
			Thanks,
David
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Code: Select all
open stack "xxxx"
if the result is not empty then
    --- error handling here
end ifCode: Select all
on mouseUp
   OpenStackFile "SomeFile"
end mouseUp
on OpenStackFile pFile
   if there is not a stack pFile then
      answer file "Where is the stack file "& quote& pFile& quote&"?" \
            with type "LiveCode Stack|livecode,rev,mc|RSTK" or type "All Files|*|*"
      if it is empty then exit to top
      if there is not a stack it then
         answer "Not a stack file: "& it
         exit to top
      end if
      put it into pFile
   end if
   open stack pFile
end OpenStackFile
