HyperCard 2.0: a closer look.
HyperCard 2.0 contains over 100 new features and improvements that greatly expand the potential of the original version that we have come to know and love since its release in 1987. This is the first of two columns devoted to a detailed look at the changes made in HyperCard 2.0.
Variable Card Sizes
The tyranny of the 9-inch diagonal card size is history. Cards now can be any size and may range from 64x64 pixels all the way up to 128OX1280 pixels (18 inches square) depending on available memory. HyperCard 2.0, however, does impose a limit of one card size per stack.
A stack may be resized at any time in any one of three ways.
The first method involves clicking on the Resize... button in the Stack Info dialog box (Figure 1). You can drag the handle on a miniaturized screen rePresentatiOn of the card until you reach the card size you want The dialog box also provides ready-made settings for 9-inch screens, 13inch monitors, etc. Choose "Screen" from the pop-up settings menu and the card will resize itself to fit the particular screen with which you are working.
Secondly, you can also set a new card size whenever you create a new stack. The new stack dialog box is wider and includes the same resizing controls as found in the method just described.
Finally, you can resize a stack with the new Scroll window. The Scroll window is a floating window that sits in front of the card. It allows you to "scroll" through different parts of a card larger than the screen you are working with and also permits resizing of the stack. To bring up the Scroll window, either choose Scroll from the Go menu or type Command-E. The only limitation that the Scroll window imposes is that you cannot make the card larger than it has already been set. For that, you need to choose Resize ... from the Stack Info dialog box. HyperCard 2.0 now allows two Or more stacks to be open in their 0- windows at the same time depending on available RAM (Figure 2). This allows users to navigate through stacks quickly d to -t and paste between stacks easily. You can flip through stacks by clicking on them, by using the Next Window command in the Go menu, or by typing Command-L.
New stacks can be opened in a new window by choosing Open Stack from the File menu and checking off "Open stack in new window" in the dialog box or via a HyperTalk script.
Me following example is a button script that will open a stack named "Fred" in its own window when the button is clicked:
On mouseup Open stack "Fred' in a new window End mouseup
HyperCard 2.0, however, will not allow you to have two or more windows open that show cards from the same stack. The members of die HyperCard Development Team had planned such a feature, but dropped it from the final release since it presented a number of thorny human interface problems.
One such scenario posed the problem of what would happen when two windows were on the same stack and the stack was closed from the active window. dow. In this case, the programmers could not decide what should happen to the stack in the inactive window.
Previous versions of HyperCard only allowed one font, one style, and one size per field. A few zealous HyperCard developers attempted to create their own fonts to get around this limitation but had mixed results.
Now, with HyperCard 2.0, we can have the things that we have taken for granted in other Macintosh programs. We can mix any font size, and/or style together in a field, giving us the freedom to make our stacks as ugly as we like (Figure 3).
When HyperCard first came out, we discovered it was possible to create "instant" hypertext by simply placing a transparent button over a word or group of words so that it would perform some sort of an action when the user clicked on the word(s). However, HyperCard lacked the ability to have a button literally stick" to text in a scrolling field.
Some of us managed to get around as limitation by creating some ingenious scripts. (See the scripts in the HyperCard, version of Macintoshed Libraries 2.0l,' for some examples.) However, these scripts did not address die obvious need to be able to click on groups of words in a scrolling field.
The solution to this problem, according to the HyperCard Development Team, was not to have a "sticky" button at all, but rather to allow text to actually respond to mouse clicks, thereby allowing some sort of user-programmable action via HyperTalk.
In HyperCard 2.0, when a field is locked, all the text becomes "hot." Three new functions, the clicktext, the clickChunk, and the clickline, can be applied to a field to determine what word, chunk (character substring), or paragraph the user has clicked.
For example, the following field script initiates the Answer command when the word "Fred" is clicked:
if the clicktext = "Fred' then
answer "Fred isn't here right
Not only can these functions be used to look for a word or string of text, but they also can be used in conjunction with the text font, style, and size to look for a particular text attribute and perform an action based on it. The following script activates a different Answer command depending on whether the text style is bold or italic: on mouseup
If the text-style of the click-chunk is
answer "You have selected
if the textstyle of the click - Chunk is Italic then
answer "You have selected
end if end mouseup
In addition, a new text style called Group has been added; Group works in conjunction with these functions. By selecting a group of words or characters and applying the Group style, the characters look no different to the user than before but are now recognized by the clicktext, clickChunk, and clickline functions as a group" of words or text strings.
Enhanced Printing Capabilities
A major criticism of HyperCard was the lack of decent printing and reporting features. A number of third-party developers managed to get around these limitations by creating XCMDs to overcome these limits. One of the most significant of the printing add-ons was Mediagenic's Reports. Apple has corrected these shortcomings by providing full-featured printing and reporting capabilities.
First of all, you can print any field or portion of a card with a HyperTalk expression. You can tell HyperCard to print only "background field number 3" or "print line 15 to 25 of field 1" of a card. You can also print a portion of a card. The following script limits printing to a portion of a card from screen coordinates "100,100" to "300,500":
print card from 100,100 to
300,500 end mouseup
HyperCard 2.0 allows you to mark" cards for selected printing. You can do this either by checking "Card marked" from the Card Info dialog box or through scripting. For example, you can write the following button script to mark any card where the background field id 1 contains the string "Fred" and then print them:
mark cards where bg field id 1
print marked cards end mouseUp
Marking cards also facilitates searching for records as we shall see when we examine some of enhanced searching features of HyperCard 2.0 in the next column.
The most welcome of the new printing enhancements is an expanded reporting feature (Figure 4). Now you can save reports as templates and have as many report templates in a stack as disk space allows. You can cut and paste templates between stacks, and, if you create a new stack with "copy current background" turned on, all the reporting templates are saved with the new stack.
Here's a simple example to show you how the multiple report feature works. Let's say you have a template for printing the contents of selected fields for a HyperCard stack that you have created to keep track of your video collection. You can then open another template on the same stack that prints out mailing labels to videocassette vendors listed in your HyperCard stack.
In addition, a new Report Item editor (Figure 5) allows you to control the appearance of each element in a report, including font, size, and style of text.
In the next column, we'll take a detailed look at more of HyperCard's exciting new features including userdefinable menus, the Icon Editor, new HyperTalk messages and XCMDS, enhanced script editing and debugging features, and enhanced searching capabilities.
1. Bill Vaccaro and Edward L Valauskas, eds., MacIntoshed Libraries 2.0.1 Apple Library Users Group: Cupertino, CA, 1989.
|Printer friendly Cite/link Email Feedback|
|Publication:||Computers in Libraries|
|Date:||Sep 1, 1990|
|Previous Article:||Systems Integration for Write-Once Optical Storage.|
|Next Article:||Systems librarian and automation review.|