[comp.sys.mac.hypercard] marking only cards of a certain background

mikef@bbs.acs.unc.edu (Michael Freedburg) (02/16/91)

You know, I hate this!! This is a problem to which there is a solution
so simple, so elegent, so **obvious** that my tired and now dessicated
brain has no power left to come up with it. I need to mark only the
cards of a certain background in my mailing label stack, which contains
three backgrounds. Now, of course I could write a little loop:
go to first card of bg "TheLabels"
repeat for the number of cards in background "TheLabels"
	mark this card
	go to next card of background "TheLabels"
end repeat
but this seems stupid and wrongheaded!! I know that there is some way
for me to use the more extensive mark cards where syntax, but what is
it? I tried to do: mark cards where name of background contains
"TheLabels" but this does not work of course.
Help me, please!! I'm so tired and the last two bottles of Jolt now only
induce more typos rather than increase my efficiency....
Jeanne, Kevin, as one netter says:
release my from this trance
mikef@samba.acs.unc.edu

gourdol@imag.imag.fr (Gourdol Arnaud) (02/17/91)

A solution is:
mark cards where the short name of this bg is "TheLabels"

There are probably other ways to do it.

Arnaud.
-- 
   /======================//==========================================/
  / Arnaud Gourdol.      // On the Netland:         Gourdol@imag.fr  /
 /                      // Via AppleLink: Gourdol@imag.fr@INTERNET# /
/======================//==========================================/

lee@quincy.cs.umass.edu (Peter &) (02/20/91)

In article <18147@imag.imag.fr> gourdol@imag.imag.fr (Gourdol Arnaud) writes:

   Path: dime!umvlsi!m2c!crackers!samsung!uunet!mcsun!corton!imag!gourdol
   From: gourdol@imag.imag.fr (Gourdol Arnaud)
   Newsgroups: comp.sys.mac.hypercard
   Keywords: mark cards, limiting it to a background
   Date: 17 Feb 91 15:56:10 GMT
   References: <2626@beguine.UUCP>
   Reply-To: gourdol@imag.fr (Gourdol Arnaud)
   Organization: IMAG Institute, University of Grenoble, France
   Lines: 11

   A solution is:
   mark cards where the short name of this bg is "TheLabels"

   There are probably other ways to do it.

   Arnaud.
   -- 
      /======================//==========================================/
     / Arnaud Gourdol.      // On the Netland:         Gourdol@imag.fr  /
    /                      // Via AppleLink: Gourdol@imag.fr@INTERNET# /
   /======================//==========================================/

I don't remember the original post clearly, but if the goal is to mark cards
that contain a pattern, but only when those cards are of a particular
background, the following should be significantly faster for large stacks:

set the dontsearch of background "uninteresting 1" to true
set the dontsearch of bg "uninteresting 2" to true
  ...

mark cards by finding "gleep" in fld "glorp" -- or whatever

  ...
set the dontsearch of bg "uninteresting 2" to false
set the dontsearch of bg "uninteresting 1" to false

This takes advantage of the fact that "mark cards by finding" uses the
very speedy "find" mechanism, while "mark cards where" seems to visit every
card in the stack, regardless of the marking criteria.

As always, your mileage may vary...

							-Peter

--
|-                       Peter E. Lee, Staff Assistant                       -|
|   Software Development Lab at the University of Massachusetts at Amherst    |
|         lee@cs.umass.edu or Fuligin@umass.bitnet or (413) 256-1329          |
"When you expect whistles, it's flutes.  When you expect flutes, it's whistles"