Re: quicksorts [Re: List sorting dilemma]
Re: quicksorts [Re: List sorting dilemma]
- Subject: Re: quicksorts [Re: List sorting dilemma]
- From: Andy Wylie <email@hidden>
- Date: Sat, 27 Jul 2002 14:58:10 +1200
on 27/7/02 1:52 PM +1200: Paul Berkowitz wrote:
>
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?
>
The Serge technique just doesn't seem to be required for global purposes
where 'my x's item 1' seems simpler, apart from that I see no advantage
using 'my' but I'm still interested in cases where the Serge technique
offers speed over 'my' as I believe they exist.
>
'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?
>
In the top level yes and 'my sortThis' in the handler.
>
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.
>
nor I
>
A distaste for script objects? Yeah, I used to have the same, until these
came along.
>
no distaste, just curious
>
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.
>
I'm sure you could work around that if desired with multiple handlers and
properties, hey! wrap them all up in another object :)
_____________________________ Andy
_______________________________________________
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.