Re: Copy and Replacing
Re: Copy and Replacing
- Subject: Re: Copy and Replacing
- From: has <email@hidden>
- Date: Fri, 4 Oct 2002 22:21:42 +0100
Paul Berkowitz wrote:
>
> Whats the sytanx of the with replaicing statement and can I use it with a
>
> copy command. I tried and it won't compile, giving and error that "A
>
> Replacing:true can't go with folder"
>
>
If your message subject is any indication, it looks as if your problem is
>
not with the replacing parameter, but with the command: if this is in the
>
Finder (or any other app), you should be using 'duplicate' in the Standard
>
Suite, not 'copy'. 'copy' is an AppleScript term for setting variables, not
>
a Finder command for making duplicates of folders, files and other Finder
>
items.
With the Finder, additional confusion may exist because there IS a 'copy'
command in its dictionary. <hack-hack><spit-spit> However, the Finder's
'copy' command has the same function as the menu 'Copy Cmd-C' option.
Certainly, there's nothing in the classic Finder's dictionary to indicate
anything to do with file copying. I'm too lazy to check the X Finder,
though, so can't speak for that.
Application dictionaries, despite their several significant flaws, are
still essential reading. Ignore them at your peril...
has
-------
[semi-OT]
BTW, anyone else _loathe_ the 'copy foo to bar' assignment statement as
much as I do? First there's the confusion caused by overloading a single
word so much in the first place. Secondly, it puts the assigner and the
assignee the opposite way around from 'set'.
It would have been much more consistent (and leave less room for confusion)
had the designers provided a copying operator - 'a copy of' - in the same
way as they do for creating references ('a reference to'). Then you have:
set bar to foo
set bar to a copy of foo
set bar to a reference to foo
rather than:
set bar to foo
copy foo to bar
set bar to a reference to foo
Not to mention elegant constructions:
return a copy of baz
instead of ugly:
copy baz to bazCopy
return bazCopy
Just a thought...
-------
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.