[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with printing in HyperCard IIGS



In article <2ca659$c97@ausom.ausom.oz.au>, Stephen Davidson writes...
> 
> Problem 1
> ----------
> 
> I'm trying to print reports using templates that I've set up. The info
> that I want to print is a couple of fields from a series of cards. The
> info from each card is only 6 lines.  I've set up a template the way I
> want printed out. However, the series of cards isn't continuous, but
> scattered throughout the stack. eg info from card 1, 5, 15, 18, 30, etc.

    The only solution I can think of is this:

1.  Create an invisible background text field called MarkFlag
2.  Create a button called "Mark" and attach to it this script:

on mouseUp
  if the name of me is "Mark" then
    set the name of me to "Unmark"
    put "0" into bg fld MarkFlag
  else
    set the name of me to "Mark"
    put "1" into bg fld MarkFlag
  endif
end mouseUp

    I typed that out on-the-fly, so there might be a syntax error in
there I didn't catch, but I think you get the idea.

3.  Write a temporary script which fills all the MarkFlag fields with 1's. 
4.  When you need to print, sort the stack on that field.  All the cards
    that have been marked will come first.

    This is a very general solution, and may not work for your stack
(e.g., you have more than one background, HCGS will try to sort ALL the
cards).  It also doesn't keep track of how many cards are marked.  You
need to store that result in another hidden, shared field and add a
couple of lines to the above script to increment/decrement the counter. 
Not by any strech of the imagination an elegant solution, but if someone
can do better, I'd love to hear it too.

    I don't have any solutions for problems 2 or 3 though.  :(
-- 
Brian Tao:: taob@io.org (Internex Online, 416-363-3783, 27 lines, v.32bis)
::::::::::: 90taobri@wave.scar.utoronto.ca (University of Toronto, 9T4)