Help switching from revCopyFile for sandboxing

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Help switching from revCopyFile for sandboxing

Post by doobox » Tue Jan 29, 2013 6:08 pm

Hi there,

I could use a little shove in the right direction, in order to update this small snippet of code from my app, so it can be sandboxed.

Code: Select all

on exportRow pPath
   set the title of this stack to "Choose Export Folder"
   answer folder "Please choose a folder:" with specialfolderpath("desktop")
   set the title of this stack to "Dictaphone"
   put it into tUserFolderChoice
   if tUserFolderChoice is empty then
      exit exportRow
   else
      revCopyFile pPath,tUserFolderChoice -- this is what the sandbox does not like i beleive
      play audioClip tm_notif_10.wav
   end if
end exportRow
I am not even sure i can do this.
When the user clicks an icon on any of the rows in my data grid, it runs the exportRow handler, and copies the .wav file from the app folder, to the users chosen location.
I have the entitlement for read write access to user selected files.
But would this cover, what i am doing..?
I can read and write in my app folder without entitlement right..?
So I want to write to the folder the user selected(i should be ok there)..from a folder(my app folder) where i dont need entitlement.
Any way im getting all at crossed purposes. The main first obstacle is that revCopyFile uses apples finder script and is definitely whats throwing errors in the console monitoring "sandboxd" at the moment.

Kind regards
Gary
Kind Regards
Gary

https://www.doobox.co.uk

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Help switching from revCopyFile for sandboxing

Post by Klaus » Tue Jan 29, 2013 7:31 pm

Hi Gary,

...
put url("binfile:" & tOriginalFile) into url("binfile:" & tNewFilePath)
...
Just supply valid filenames for tOriginalFile and tNewFilePath :D


Best

Klaus

Post Reply