Re: quicksorts [Re: List sorting dilemma]
Re: quicksorts [Re: List sorting dilemma]
- Subject: Re: quicksorts [Re: List sorting dilemma]
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 26 Jul 2002 18:52:16 -0700
On 7/26/02 5:54 PM, "Andy Wylie" <email@hidden> wrote:
>
And there you have it:
>
>
>
> 'Serge' for handlers
>
> 'Nigel' for main scripts
>
>
I fail to see such a distinction Paul, a listHolder property in the main
>
script is all that's required to use 'my' in a handler or simply 'set
>
sortThis to {1,2,3}'.
The first (listHolder property in main script) would work. I suppose you'd
just need to set it back to {} or missing value at the end of the script. of
course you might need several of these going at once. I've even had lists
within lists. What do you see as the advantage of doing it this way rather
than in a more modular manner?
'set sortThis to {1,2,3}' in what context? That won't work in a handler":
you can't then refer to 'mySortThis'. Unless of course you've previously
declared sortThis as a property or global in the main script, as i said
you'd have to do. Is that what you mean? We may be speaking at
cross-purposes - perhaps you could give an example? Again, if you have half
a dozen of these going, maybe passing from one handler to another, I don't
see the advantage to making all of them global. A distaste for script
objects? Yeah, I used to have the same, until these came along.
I've had to work a lot with scripts recently where the 'main script' was
actually an 'on open' handler, and the lists did not get defined until deep
into this handler and/or other handlers called by the 'on open handler. In
this context, the script objects were very useful.
--
Paul Berkowitz
_______________________________________________
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.