New ways to print in HyperCard 2.0 (computer program) (Homecard) (evaluation)
by Roger Wood
One of the most dramatic improvements to HyperCard 2.0 is its printing capabilities. HyperCard 1.x allowed no way to easily select and print several cards scattered throughout a stack. Unless you used special scripting, you were stuck with printing either a single card or a whole stack - there was no in-between.
True, stack hackers devised numerous tools for printing a selected series of cards, but they required special scripts, special print-only stacks, or even external commands (XCMDs). There were XCDM-linked applications, such as Report! from Activision, that made up for the missing features, but the trade-off in added complexity was too much for all but the most ardent users.
Worst of all, HyperCard's built-in report printing wasn't versatile enough to be very useful. Layouts were dismally limited in scope. You could only choose to include selected background fields in one of three formats: labels, rows, or columns. Although the labels option was useful, the other two options were of no practical value for serious report printing.
One of the major ways that these shortcomings in printing are overcome in HyperCard 2.0 is by the introduction of a deceptively simple property of cards called marked. You can set this property for a particular card either by using the Card Marked check box in the Card Info dialog box or by using the set command as follows:
set the marked of this card to true
If opening a card's info dialog box or typing into the message box is more than you want to do each time you need to mark a card, you can create a background button that lets you mark a card with a check-box button.
Here's how to do it: * Go to the stack where you wish to
create the new button. * Select the background by typing
Command - B. * Choose New Button from the Objects
Menu. * When the new button appears,
double-click on it to display the Button
Info dialog box. * Change the name of the button to
Marked. * Deselect the Shared Hilite button.
This new feature allows each card
within a background to have its own
distinct highlight property on an
otherwise shared button. * Choose Check Box as the button
Style. * Finally, click on the Script button in
the lower left of the screen and enter
the script below.
on mouse Up
set the marked of this card to not the marked of this card
set the hilite of me to not the hilite of me end mouseUp
With this button in place and armed with HyperCard 2.0's new printing capabilities, you can easily select just a few cards to print using any of HyperCard's standard printing features. If you select Print Stack, a dialog box appears that let you choose all of the cards or just the marked ones. Likewise, if you select Print Report, you can choose to have the report include all or just the marked cards.
I should note that this marked card property not only allows for more selective printing, but can also be used to limit the sort, find, and even the go command to only marked cards.
When you select the Print Report menu option, you're presented with a dialog box that looks similar to the one in ealier versions of HyperCard. The layout looks remarkably like the olds labels layout, and you can resize the blocks in the same way. You just grab and drag the handle on the upper left block, and all the blocks change accordingly.
But that's where the similarity with older versions of HyperCard ends. You can now assign several items to a block. If you think of each of these blocks as a single database record within any HyperCard report, it's just a matter of assigning which fields - in this case background fields - go where. This is done with a very intuitive system quite similar to creating buttons and fields on cards. You resize the fields and move them in a layout dialog box.
Double-clicking on an item takes you to an Item Info dialog box. From there, you can used a scrolling list to select the HyperCard field that will go in the item's area. You can select a different font, size, style, line height, or alignment of text for each items; or you can just use the card's default formatting - the choice is yours. If that isn't enough, you can define what is assigned to an item by writing a special HyperTalk handler and assigning it to the item. Exactly how this works goes beyond the scope of this column, but the system is incredibly flexible and powerful.
You can create and save as many as 16 report templates per stack. Plus, the templates can be cut, copied, and pasted between stacks for quick creation and modification. You can call them up via the Print Report dialog box or by name from a script.
Roger Wood has worked as editor of HyperLink Magazine and managing editor of Home Computer Magazine.