Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ucbvax!husc6!amcad!stech!sysop From: sysop@stech.UUCP (Jan Harrington) Newsgroups: comp.sys.mac.hypercard Subject: Re: "Repeat with...." question Message-ID: <461@stech.UUCP> Date: 27 Feb 88 12:21:16 GMT References: <8232@eleazar.Dartmouth.EDU> Organization: Scholastech, Inc., Waltham, Mass. Lines: 46 in article <8232@eleazar.Dartmouth.EDU>, boz@eleazar.Dartmouth.EDU (John Boswell) says: > > Hi. I am a little stumped, so I figured I'd ask the net... > I wrote a nifty (I think 8-) ) stack for keeping track of my music col- > lection and one to keep track of my library. One of the buttons in each stack > looks at all the cards and determines which items at any particular time are > out on loan to someone. This can be useful if I need to "recall" a book or > cd, or whatever, or to remind someone to return something they borrowed 6 monthsago.. > > My problem is that the button contains the following script: (in part) > > repeat with the number of cards of this bkgnd > > ...do the checking > > end repeat > > Problem is, this doesn't work, and HC chokes on the "of this bkgnd". > For my music stack this isn't a major problem... I only have one bkgnd, > so I just took out the "of this bkgnd" part of the button script. that works > fine. However, I have TWO backgrounds in my library stack... taking out the > "of this bkgnd" results in the button repeating for the number of cards in > the ENTIRE stack! Needless to say, this results in say, a single item on > loan being "found" and reported too many times! Sometimes you have to put a quantity into a container all of its own to use it in a repeat statement. Try something like: put the number of cards of this background into NumbCards repeat with NumbCards ... end repeat Jan Harrington, sysop Scholastech Telecommunications UUCP: ihnp4!husc6!amcad!stech!sysop or allegra!stech!sysop BITNET: JHARRY@BENTLEY ******************************************************************************** Miscellaneous profundity: "No matter where you go, there you are." Buckaroo Banzai ********************************************************************************