Path: utzoo!attcan!uunet!husc6!mailrus!tut.cis.ohio-state.edu!diplodocus.cis.ohio-state.edu!jgreely From: jgreely@diplodocus.cis.ohio-state.edu (J Greely) Newsgroups: comp.sys.mac.hypercard Subject: Re: Sorting Efficiently Message-ID: <39237@tut.cis.ohio-state.edu> Date: 13 Mar 89 05:45:13 GMT References: <670@maths.tcd.ie> Sender: news@tut.cis.ohio-state.edu Reply-To: J Greely Organization: The Ohio State University, Department of Computer and Information Science Lines: 15 In article <670@maths.tcd.ie> mlloyd@maths.tcd.ie (Michael Lloyd) writes: >A friend is developing a large bibliographic stack - by large, I mean ~700 >cards thus far, with no end in sight. When references are added, they are >done via New Card at the end of the stack. After an adding session, they have >to be inserted alphabetically into the card order - hence a sort command. Why not insert them into the correct position when they're created? In a "New Card" button, ask for the Index field, do a binary search to find the correct insertion position, create the card, and go. If you trap doMenu, you can guarantee that all new cards will be inserted in order. If you get stumped on the scripting, let me know, and I'll send you a sample script/stack. -=- J Greely (jgreely@cis.ohio-state.edu; osu-cis!jgreely)