Sort cards doesn't work in 7.0

Timothy Miller gandalf at doctorTimothyMiller.com
Mon Oct 27 14:08:06 EDT 2014


On Oct 25, 2014, at 12:06 PM, Richard Gaskin wrote:
> 
> 
> And weirder still, this behavior seems consistent in both 6.7 and 7.0.
> 
> Tim, any chance you may have NULLs or other oddities in the data?  When you test across versions, is it with the same data?

I've been able to replicate the problem in my stack, which might have a few distinctive features necessary for others to replicate the problem.

The stack has, say, 2000 cards. Cards 2 through 2000 contain many fields and buttons, all belonging to the same group. "Behave like a background" is turned on.

Card 1 is used for an index and some maintenance buttons, and so on. Two buttons on card 1 contain the sort scripts:

--sort cards numeric by field "intakesecs"

--sort cards text by field "patient name"

Neither field "intakesecs" nor field "patient name" appears on card 1.

These buttons have worked just fine since late versions of hyperCard. In version 7.0 they stopped working. The sort command seems not to be executing at all, judging by timing the script when it is working, in version 6.5 vs. when it is not working, in version 7.0

I found two workarounds.

--Move my "sort cards" buttons to any card other than card 1. I didn't bother pasting them into the group, so group membership probably doesn't make a difference.

--Paste field "intakesecs" and field "patient name" onto card 1. I put dummy values into those fields, don't know what happens if they are empty.

I have not exhaustively investigated the issue, but my hypothesis is that the "sort cards" command looks for the sort index field on the first card it encounters. If the field is not found, the sort command terminates.

Thanks for asking. I overlooked your question yesterday.

Tim Miller





More information about the use-livecode mailing list