Re: POSIX and lists question
Re: POSIX and lists question
- Subject: Re: POSIX and lists question
- From: "John R." <email@hidden>
- Date: Fri, 12 Aug 2005 16:25:17 -0400
Mark J. Reed wrote:
>set thePaths to map(theFiles, POSIXize)
>
> Or I could use the apply() function to modify the list in place:
>
>apply(theFiles, POSIXize)
>
> Yeah, I know, mixing metaphors with Perl and Lisp, but I don't
know how to
>write a single handler that will honor changes made within the
passed-in
>closure.
HTH wrote:
>>And are these _real_ constructs in people's scripts?
>Not in AppleScript because, as I've pointed out, the behaviour is
both undocumented and broke
Gary wrote:
>And this is becoming clearer, and I see the utility of that kind of
>construct. And I also see why it's pretty far [from] the kinds of
things that basic
>AS applications need do (not that they wouldn't benefit from being
able to
>do.)
Thank you, Mark & Gary and HTH. I learned something listening to you
guys.
One point I am confused about: Are Mark's "map" and "apply" examples
the right way to do this in AS, or (as HTH seems to imply with his AS
complaint) are Mark's routines going to yield unexpected results
sometimes?
It seems that Mark's handlers would be very useful models for similar
AS handlers: for sorting a list, or for selecting item(s) from a list
using custom criteria. Another benefit is to clean up my code by
pushing annoying repeat blocks into (a few simple-to-maintain) handlers.
- John
_______________________________________________
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