Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!maxwell.physics.purdue.edu!sho From: sho@maxwell.physics.purdue.edu (Sho Kuwamoto) Newsgroups: comp.sys.mac.hypercard Subject: Re: selecting contents of a locked field Summary: brute force Message-ID: <2647@pur-phy> Date: 15 Oct 89 20:04:39 GMT References: <9490@june.cs.washington.edu> Sender: news@pur-phy Reply-To: sho@maxwell.physics.purdue.edu.UUCP (Sho Kuwamoto) Organization: Purdue Univ. Physics Dept., W. Lafayette, IN Lines: 52 In article <9490@june.cs.washington.edu> moore@cs.washington.edu (Charles Moore) writes: >I've got a couple of problems that I wonder if somebody has solutions >to. I would like to have an index card in a stack that lists all the >other cards in the stack by the contents of some identifying field. I >would like to be able to go to any listed card directly from the index >and I would like to request the deletion of any listed card without >leaving the index. Here's what I do in my record collection stack. ----- on mouseUp findBand end mouseUp on findBand set cursor to busy put (item 2 of the clickLoc) - (item 2 of the rect of field "Band Names") + the scroll of field "Band Names" into whichBand put (whichBand DIV textHeight of field "Band Names")+1 into whichBand select line whichBand of field "Band Names" put line whichBand of field "Band Names" into whichBand lock screen set cursor to busy go to first card of background "Record" find whole whichBand in field 1 set cursor to busy if the result is not "not found" then unlock screen with iris open else go to card "root" unlock screen answer "Didn't find album by"&& whichBand & "." with "Fix list" or "Cancel" if it is "Fix list" then sortCards end if end findBand ---- In your case, I would just delete the part of the script that does the actual action, and keep the part that finds the line number and selects the line. You'll have to keep a global variable around for the last line number selected, and the time at which it was selected in ticks. You could also keep a hidden field with the ID numbers already in it. Calculate the line number, and find the appropriate ID number to go to. -Sho -- sho@physics.purdue.edu <<-- hypercard novice.