No subject

Howard Bornstein howard.bornstein at gmail.com
Thu May 26 12:31:35 EDT 2005


On 5/26/05, brad at activadesign.com <brad at activadesign.com> wrote:
> This is probably something obviouse. Here's the script:
> 
> answer file "Please select a file."
> put there is a file it
> put URL it into field "Entities"
> 
> The second line outputs true. The third line just places the path into the
> field, not the file's contents (it's just a text file I'm trying to
> import). I get exactly the same results if I remove the URL from the
> statement. I've tried adding 'put "field:" & it...
> 
> OS 10.3.9, RR 2.5.1
> 
> Brad

Rev likes the path formed before referring to it. Try this:

on mouseUp
  answer file "Please select a file."
  put there is a file it -- don't really need this check
  put "file:"&it into tPath
  put URL tPath into field "Entities"
end mouseUp

You don't need the check for the file since you've just selected it
via the answer file dialog. More typically you'll use something like
this after the answer statement:

 if it is empty then exit mouseup

HTH

-- 
Regards,

Howard Bornstein
-----------------------
www.designeq.com


More information about the use-livecode mailing list