Re: Problem Compiling
Re: Problem Compiling
- Subject: Re: Problem Compiling
- From: "Paul F. Henegan" <email@hidden>
- Date: Tue, 21 Dec 2004 05:15:56 -0500
on 18.12.2004 14:54, Todd Geist at email@hidden wrote:
>
> I copied the following routine from apple site. It will compile in Script
> Editor, but not Smile and it returns an error when I try to use it inside
> FileMaker 7.
>
> on write_to_file(this_data, target_file, append_data)
> try
> set the target_file to the target_file as text
> set the open_target_file to open for access file target_file with
> write permission
> if append_data is false then set eof of the open_target_file to 0
> ** write this_data to the open_target_file starting at eof
<snip>
> ** this line causes the following error "Expected end of line, etc. but
> found identifier."
>
> What am I missing?
>
Hi Todd,
This is a subroutine, or what AppleScript calls a handler. It expects that
values for this_data, target_file, and append_data are given to the routine
defined as write_to_file() from another routine. The 'set' command has given
a value, however specious, to the variable target_file, and
append_data--which seems to be a boolean, from the context--seems to have
been accepted by the compiler as false. The variable this_data has yet to be
defined, hence the error.
What is puzzling is why the error didn't occur at the line
"
set the open_target_file to open for access file target_file with write
permission
"
since the command 'open for access' is often so fussy 8^)
at least for me :(
Peace,
paul
--
Paul F. Henegan
<email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden