[comp.sys.mac.hypercard] SORT changed in HC 1.2

ns@cat.cmu.edu (Nicholas Spies) (06/13/88)

Time was, in HyperCard 1.0.1 and 1.1, that you could pass a function as
the "with" parameter to sort, as well as chunk expressions. It seems that
HyperCard 1.2 doesn't like this, and instead puts up and error dialog saying
something to the effect that "xx is an invalid expression on every card".

The value of passing a function to sort is that you used to be able to 
perform parsing and concatenation of strings used as the sort keys. For
instance, if you want to sort a stack of names by last name, and yet want
the first and optional second and third names to be significant in the sort,
and at the same time ignore any instances of "Jr", chunk expressions just
won't suffice--you need to write a function to message the names into the
desired order before they are looked at by sort, which sorts them. 

Although using a function as the sort parameter was not documented, it worked
fine in 1.0.1 and 1.1, and it is a consistant generalization of using "&" to
concatentate chunk expressions for sort (which is how I found out that it
worked in the first place). I can't imagine why this capability was removed
in 1.2, and sincerely hope that it is reinstanted, and documented, in future
versions.


-- 
Nicholas Spies			ns@cat.cmu.edu.arpa
Center for Design of Educational Computing
Carnegie Mellon University

kurtzman@pollux.usc.edu (Stephen Kurtzman) (06/14/88)

In article <1923@pt.cs.cmu.edu> ns@cat.cmu.edu (Nicholas Spies) writes:
>Time was, in HyperCard 1.0.1 and 1.1, that you could pass a function as
>the "with" parameter to sort, as well as chunk expressions. It seems that
>HyperCard 1.2 doesn't like this, and instead puts up and error dialog saying
>something to the effect that "xx is an invalid expression on every card".

It would be funny if this has really changed. I recall a Mr. HyperTalk (forgot
his name, Dan something-r-other) posting that suggested passing the
random number function to "shuffle" the cards in a stack.

It would be nice if Dan would answer this one. I made up my mind a while back
that I would put off buying any book on hypertalk until I found one that
documents this function. My reasoning is that it is an obscure usage of sort
and anyone who knows about it possibly knows alot. Of course, if this is
no longer true, my heuristic is in error.