TweetFollow Us on Twitter

Hypercard 2.2

Volume Number: 10
Issue Number: 3
Column Tag: Tools Of The Trade

Hypercard 2.2

by Paul Foraker

Apple's taken HyperCard back from Claris. Here's what they've done with it

In 1987, when Apple Computer introduced HyperCard at MacWorld Boston, most experts thought that users would primarily 'play' stacks, not script their own. Turned out that a majority of HyperCard users became scripters. Furthermore, to the surprise of HyperCard's creator, Bill Atkinson, and the rest of the HyperCard Team, a very large number of scripters were in the business and education markets, not the home market. With the introduction of HyperCard 2.2, Apple Computer makes a small but significant step toward acknowledging its technical market, and this version represents a significant upgrade to perhaps the most popular development environment on the Macintosh.

There are actually two HyperCards: the full application and the unscriptable HyperCard Player. In the beginning, when there was only one, the full version of HyperCard shipped in the box with every Macintosh. When Claris took over the application a few years ago, the HyperCard Player was introduced, replacing the complete application in the CPU box, and a "HyperCard Developer's Kit" was sold separately. With version 2.2, Apple continues this scheme, although without calling the full version a "developer's kit". In the United States, every new Macintosh will have the HyperCard Player on its hard drive. The About box in the Player mentions the full version.

(Claris also tried an interim scheme of shipping a crippled, low user-level, Home stack, which users could override by typing 'magic' in the message box. There was some confusion between this version and the Player, that had people trying unsuccessfully to type 'magic' in the message box of the Player. The magic in HyperCard 2.2 is all plain and visible.)

What's in the box?

Weighing nearly as much as the original 128K Macintosh, the HyperCard 2.2 product box contains the full development version, AppleScript 1.1 Runtime, and for a limited time, Motion Works' ADDMotion II, for a total of eleven 800K diskettes. The documentation has been updated and includes a revised Script Language Guide and HyperCard Reference Manual. Serious AppleScript developers will want to purchase the AppleScript 1.1 package separately, because the bundled version does not contain the AppleScript Language Guide. On-line documentation includes the HyperCard Help, HyperTalk Reference, and the HyperCard AppleScript Reference stacks. Balloon help has been implemented extensively.

An installer places a 10+ MB "HyperCard 2.2" folder on the designated hard drive. Users can customize the installation to leave out AppleScript and ADDMotion.

What's new?

Most of the differences between HyperCard 2.1 and 2.2 can be summarized under five categories: (1) OSA support, (2) color, (3) stand-alone applications, (4) enhancements to HyperCard's feature set, and (5) improvements to HyperTalk, HyperCard's built-in scripting language. In addition, WorldScript support has been improved such that, with the Japanese language kit installed, users can have both Kanji and Roman text in the same field.

The file format for HyperCard stacks did not change with this version, so HyperCard 2.1 can open and run stacks built in 2.2 (except, of course, the new features). Further, HyperCard 2.2 can open and run 2.1 stacks without any conversion.

OSA Support

HyperCard users tend to think of HyperCard and HyperTalk as inseparable. In version 2.2, HyperTalk is not the only language that can be used in HyperCard scripts. Any OSA-compliant scripting language (such as AppleScript, UserScript, QuicKeys) can be used in the scripts of HyperCard objects. A new popup menu in the script editor lists the available languages on the user's computer.


Figure 1 The new scripting language popup menu in a script editor window.

HyperCard 2.2 is an AppleScript-scriptable and -attachable application, though it is not recordable. HyperCard stacks can be controlled by other applications, and, perhaps more importantly, HyperCard can provide an interface to other scriptable applications. As programmer Kevin Calhoun put it, "any scriptable application can be an XCMD for HyperCard".

HyperCard 2.2 supports the Core and Required suites for Apple Events, and provides its own HyperCard suite. About 90% of HyperCard's commands, functions and features have been implemented in the HyperCard suite. Missing commands can be executed by using the "do script" or "evaluate" commands, so virtually all of HyperCard is available through AppleScript.

Message passing between AppleScript and HyperTalk scripts is fully implemented, so that HyperTalk handlers can call AppleScript functions elsewhere in the hierarchy and vice versa.

To demonstrate the effectiveness of the AppleScript implementation in HyperCard, the reviewer constructed a simple "mail" stack. The stack provides fields for To, CC:, Subject, and Text. A Send button uses AppleScript to launch Aladdin System's scriptable terminal communications program, SITComm. SITComm dials The WELL (a multi-user conferencing system in Northern California) and sends the mail, logging off when done. When finished, the stack saves the outgoing message in a text file selected via a popup button, and checks a "Sent" checkbox. From start to finish, this stack was created and saved as a stand-alone application in about an hour.

Color

In HyperCard 2.2, color is supplied via a Color Tools stack and an XCMD, "addColor". An installer in the Color Tools stack adds a script to the user's Home stack and a Color menu to the menu bar. When the user selects Open Color Tools from the Color menu, HyperCard installs the addColor XCMD into the current stack, along with the resources necessary for managing color. By selecting colors from a 256 color palette, users can color buttons, fields, and rectangles. Color and gray scale PICTs can be imported from either the resource fork of the stack (PICT resource) or from a file on disk (PICT file). Other picture formats (for example, TIFF) are not supported. About twenty visual effects ("transitions") specific to color are provided. These are in addition to and different from HyperCard's black and white visual effects.

The color solution provided in HyperCard 2.2 is not full color support. There are no color painting tools. The color palette can not be customized. There is no support for color printing. In addition, colorized stacks do not display on black and white monitors. This last is a serious shortcoming. Commercial developers will need to do some fancy scripting to have their stacks usable on both color and black & white machines.

A third party addition to the Color Tools stack is already shipping from Heizer. Called InColor, it provides a very useful superset of color manipulation tools based on the addColor XCMD.

The addColor XCMD demonstrates a problem with 32-bit QuickDraw that developers will have to work around. When the addColor XCMD gets loaded and color is produced on the card window, 32-bit QuickDraw locks down a handle low in the HyperCard heap. If the user then opens a large-windowed stack that has not yet been opened in that session, the stack will open in a small window and there will not be enough memory for painting tools. To most users, this will appear to be a bug in HyperCard. The work around is to open any large stacks first. Hopefully, Apple will soon fix this in a future version of QuickDraw.

Stand-Alone Applications

In earlier versions of HyperCard, it was possible to create a stack that ran as a stand-alone application. This was accomplished by an XCMD, separately licensed from Claris, that embedded the HyperCard Player in a stack.

In HyperCard 2.2, this capability is built-in. The Save a Copy dialog presents a popup menu listing the possible file types, as shown below.


Figure 2 The new file type popup menu in the Save a Copy dialog

The file types that ship with this version are "stack", "custom file type", and "application". Third party developers can provide the ability to save-as other file types (for example, a text file containing all the text of a stack). There is no license fee to Apple for distributing stand-alone applications.

When the user saves a stack as an application, an intermediate dialog allows the designation of custom file type and creator.


Figure 3 Developers can specify the file type, creator and version info in this dialog.

Since stacks can be saved as standalones, with custom file type and creator, Apple has also provided the ability to save a stack as a file type other than 'STAK', using the Custom File Type option. A suite of stacks, therefore, can be bundled into a stand-alone application and its files, complete with custom icons.

With customized menus, a stand-alone application can take on its own look. Saving a stack as a stand-alone adds about 780K to the size of the stack. Developers can remove unused resources to reduce this size.

Since a stand-alone application contains all of HyperCard except the script editing environment, standalones are AppleScriptable applications. Developers will be able to build special-purpose applications and control them from other applications, including HyperCard itself.

New and Enhanced Features

  • Button families. Earlier HyperCard versions supported a button type called Radio Button, but a cluster of mutually exclusive buttons required scripting. A new "family" property removes the need to write scripts. A button family is a group of two or more buttons, only one of which may be selected at once. When the user clicks one button of the family, all the others automatically unhighlight. Up to 15 families can be defined for each card, plus an additional 15 families for each background. Families are designated either in a script (set the family of button 1 to 15) or by choosing a number from the Family pop up menu in the Button Info dialog (shown below).


    Figure 4 The new movable modal Button Info dialog and its Family popup menu. Note the preview area for the button.

  • List Fields. Another oft-scripted featured is the provision of a clickable list. In previous versions, developers had to write a script to select the line the user clicked on, get the contents of the line, then execute whatever function the user selected. HyperCard 2.2 handles highlighting the line automatically. A new field property, autoSelect, determines whether a click on a locked field will behave like a clickable menu. A Multiple Lines property determines whether the user can extend the highlighted lines to select more than one line. One significant omission is HyperCard's inability to select discontiguous lines.

    Since the list field is a field behavior and not a field type, there is no "List Field" checkbox. To create a list field, the user sets the following properties to true: lockText, autoSelect, and dontWrap.

  • Part Number. In HyperCard 2.2, every button and field has a part number, which represents its ordinal position in the background or card layer. This property will save developers much time in layering objects. Only a script can change a part's number. The part number field in the info dialog is not editable.
  • Popup Button. Before to this version, only an external command or some very fancy scripting could generate a popup menu. Now a new button type provides the correct functionality automatically. The "contents" of the popup menu button determine the items in the menu. HyperCard 2.2 makes buttons containers, just like fields. A new Contents button in the Button Info dialog provides access to the items. Unfortunately, the Contents window has no scrollbar. Users must click and drag to get to text outside the visible rectangle. Since a button may contain up to 30K of text, this will annoy some users.


    Figure 5 The new button contents dialog holds up to 30K of text, but has not scroll bar.

    A new property, titleWidth, gets and sets the width of the title area of a popup button. The selectedText and selectedLine properties apply to popup buttons as well as to list fields, for determining the selected item.

  • New button types. In addition to the Popup Button, there are three new button types: standard, default and oval. The original drop-shadow button in earlier versions of HyperCard drew criticism for deviating from the standard interface for buttons. The new Standard button eliminates the drop shadow. To complement the Standard button, HyperCard provides a Default (double-bordered) button style. The Default button, however, does not trap the Return or Enter keys. Developers must script the functionality by trapping the returnKey and enterKey messages.

    The Oval button type allows circular or oval graphics to behave like buttons, without requiring the developer to place multiple small buttons overlapped to fit the area. The "hot" area in the Oval button is (correctly) inside the oval, not the rectangle, and when colorized, the color applies only to the oval area.


    Figure 6 The color in an Oval button fills the oval, not the bounding rectangle.

    The Oval button type does not produce polygon buttons. Developers still need to buy an add-on like PolyTools from Heizer to meet that need.

  • Enabled property of buttons. Buttons can now be disabled. When disabled, their text or icon dims and the button ignores mouse events.
  • Printing enhancements. Apple made several minor improvements to report printing. In 2.2, some hidden features present in 2.1 are now explicit, and they added a Save button so users can save changes as they work on report templates. The Report Item Info dialog box shown below now has an Invert option (white text on black field) and a Framing option for drawing a line along the sides.


    Figure 7 The print items dialog includes an inversion choice and frame checkboxes.

    It is still not possible to produce graphics in reports. Printing has always been a weak spot in HyperCard, which has resulted in an excellent market opportunity for add-ons like Reports from Nine to Five Software, and FillForm from Berumen & Associates. With these extensions, report printing from HyperCard rivals that of any sophisticated database program.

  • Other enhancements. There are several other minor enhancements that provide useful additions to the program. These include balloon help for most of the commands and features; up to 16 stacks in use at once (resource files in the message hierarchy); a new default size for PowerBook screens; undo for buttons and fields; movable modal dialogs for the object info dialogs; and a new "push" visual effect (different from the color transitions).
  • Although not documented, using AppleScript for stack scripts limits the number of stacks in use.

Enhancements to HyperTalk

The New Features stack lists 35 new or enhanced features for HyperTalk, most of which fit into four categories: commands, functions, properties and messages. Here are the major ones:

  • Command changes. There is one new command, copy template, which allows a script to copy a printing report template from one stack to another. Modified existing commands include:
    • close: a script can now close a desk accessory
    • convert: a "from format" option has been added
    • delete: a script can delete a part (button or field)
    • {disable | enable}: buttons can be disabled or enabled
    • do: a script can "do" a command "as" any resident scriptingLanguage (for example: do field 1 as QuicKeys)
    • doMenu: modifier keys can be specified; for example, doMenu "Stack Info..." with shiftKey
    • find: the find command now supports international characters (diphthongs and diacritical marks)
    • {lock | unlock}: lock recent, unlock recent are now allowed
    • open: the parameters of the open command are now available to handlers
    • put: since buttons are now containers, put button 1 into field "Address" is now a legal expression
    • {read | write}: these commands now support a negative number with the "at" preposition; for example, "write theText to file theFile at -100" writes the variable to the file at 100 characters from the end of the file
    • sort: sorting by an arbitrary sort key is now allowed; for example, sort lines of container by last word of each

    Error handling for file i/o changed. Commands that fail to read from or write to a text file no longer abort the script, but return an error message in the result. Further, XCMDs no longer cause an error if they send a callback that doesn't get handled by a script (and therefore, do not close open text files).

    HyperCard now creates text files of type 'ttxt' (Teach Text) instead of 'MACA' (MacWrite). Developers can specify a different word processor by modifying 'STR ' resource #128 with ResEdit.

  • Function Changes. These include three new functions: destination(), selectedButton(), and sum(); and three enhanced functions: diskSpace(), number(), selectedLine(), and selectedText().

    The new function, destination(), returns the full path to the stack to which HyperCard is going next. This will be very useful for managing suites of stacks that share common menus. If the destination returns a stack outside the suite, for example, the script could delete the custom menus.

    selectedButton() returns the highlighted member of a button family.

    sum() adds up a comma-delimited list of numbers.

    diskSpace() now allows an optional parameter to specify the volume. number() can return the number of parts (card or background). selectedLine() and selectedText() now handle list fields and popup buttons.

  • Property Changes. There are nine new properties: the autoSelect, the dialingVolume, the environment, the family, the multipleLines, the partNumber, the scriptingLanguage, the titleWidth, and the zoomed.

    The autoSelect, family, multipleLines, partNumber and titleWidth properties were mentioned earlier. Quadra users will welcome the dialingVolume property. It allows the scripter to set and get the volume used by the dial command. The environment property is a read-only property that returns either "development" (for the full HyperCard application) or "player" for a stand-alone or the HyperCard Player. The scriptingLanguage property can be used to get and set the scripting language used by the message box or an object (card, button, etc.). The default scripting language is HyperTalk.

    A recent message on AOL asked how to center a card window on a monitor. In previous versions, it was necessary to script the location by calculating it from the rect of the screen. In HyperCard 2.2, the zoomed property centers the window on the current display.

  • Message Changes. Apple has provided a new message, mouseDoubleClick. This message is "...sent to a button, field, or card when the downstroke of a second click follows the downstroke of a previous click within the double-click interval set in the Mouse control panel and the second click occurs within four pixels of the first and the second click occurs within the same object as the first."

The "there is" operator received several welcome enhancements, including the ability to determine in a script whether there is a card or background picture, or whether there is a disk by a specific name.

Script Editing and Debugging

In addition to the scripting language popup menu added to the script editor window, a new Check Syntax menu is available for languages other than HyperTalk. With AppleScript, this menu checks the syntax, and if it passes, copies the script properly indented to the window. Scripts still do not support text styles.

No significant changes were made to the debugging environment. As in previous 2.x versions, users can step and trace through the execution of scripts, and use the Watchers to track variables and messages. These tools are not available, however, when debugging AppleScript scripts. For that, developers will need to copy their scripts to AppleScript's Script Editor and debug them from there. A third party development opportunity exists to provide such an editor in HyperCard.

Performance

HyperCard 2.2 is no faster than earlier versions. As one might expect, the addition of color and AppleScript will slow down a stack's performance. However, as many developers are realizing, HyperCard, with the addition of the appropriate XCMDs, can hold its own with the major database programs. At MacWorld in January this year, Nine to Five Software distributed the results of a bench mark test showing HyperCard outrunning FileMaker Pro by a factor of 20 in one test. With external add-ons and HyperCard's rapid development cycle, expect to see more businesses developing internal solutions with HyperCard 2.2.

Support

There are two levels of technical support available. New users can call 1-800-SOS-APPL and get help installing and launching the application. For advanced scripting help, Apple provides fee-based support. Developers can buy one of three scripting support products by calling 1-800-950-2442. Help for a single incident costs $55.00. Five incidents for 1 year costs $249.00, and unlimited incidents for 1 year is available for $399.00.

Scripting support includes the following assistance:

  • Modifying Stacks
  • Writing Stacks
  • Command syntax and use
  • Debugging Stacks
  • The current and immediately preceding version (2.2 and 2.1)

What is not included?

  • Writing and Using XCMDs
  • Stack concept and design
  • Project management or consultation

Send bug reports and feature requests to AppleLink address HYPERBUG$.

Pricing and Availability

HyperCard 2.2 is available now at a suggested retail price of $249. Developers can purchase from APDA at a significant discount ($99.00 at this writing). The upgrade price from version 2.1 (for registered Claris owners) is $89.00.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | Read more »
Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links below... | Read more »
Marvel Future Fight celebrates nine year...
Announced alongside an advertising image I can only assume was aimed squarely at myself with the prominent Deadpool and Odin featured on it, Netmarble has revealed their celebrations for the 9th anniversary of Marvel Future Fight. The Countdown... | Read more »
HoYoFair 2024 prepares to showcase over...
To say Genshin Impact took the world by storm when it was released would be an understatement. However, I think the most surprising part of the launch was just how much further it went than gaming. There have been concerts, art shows, massive... | Read more »
Explore some of BBCs' most iconic s...
Despite your personal opinion on the BBC at a managerial level, it is undeniable that it has overseen some fantastic British shows in the past, and now thanks to a partnership with Roblox, players will be able to interact with some of these... | Read more »

Price Scanner via MacPrices.net

You can save $300-$480 on a 14-inch M3 Pro/Ma...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
24-inch M1 iMacs available at Apple starting...
Apple has clearance M1 iMacs available in their Certified Refurbished store starting at $1049 and ranging up to $300 off original MSRP. Each iMac is in like-new condition and comes with Apple’s... Read more
Walmart continues to offer $699 13-inch M1 Ma...
Walmart continues to offer new Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBook for sale by... Read more
B&H has 13-inch M2 MacBook Airs with 16GB...
B&H Photo has 13″ MacBook Airs with M2 CPUs, 16GB of memory, and 256GB of storage in stock and on sale for $1099, $100 off Apple’s MSRP for this configuration. Free 1-2 day delivery is available... Read more
14-inch M3 MacBook Pro with 16GB of RAM avail...
Apple has the 14″ M3 MacBook Pro with 16GB of RAM and 1TB of storage, Certified Refurbished, available for $300 off MSRP. Each MacBook Pro features a new outer case, shipping is free, and an Apple 1-... Read more
Apple M2 Mac minis on sale for up to $150 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $100-$150 off MSRP, each including free delivery: – Mac mini M2/256GB SSD: $499, save $100 – Mac mini M2/512GB SSD: $699, save $100 –... Read more
Amazon is offering a $200 discount on 14-inch...
Amazon has 14-inch M3 MacBook Pros in stock and on sale for $200 off MSRP. Shipping is free. Note that Amazon’s stock tends to come and go: – 14″ M3 MacBook Pro (8GB RAM/512GB SSD): $1399.99, $200... Read more
Sunday Sale: 13-inch M3 MacBook Air for $999,...
Several Apple retailers have the new 13″ MacBook Air with an M3 CPU in stock and on sale today for only $999 in Midnight. These are the lowest prices currently available for new 13″ M3 MacBook Airs... Read more
Multiple Apple retailers are offering 13-inch...
Several Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices... Read more
Roundup of Verizon’s April Apple iPhone Promo...
Verizon is offering a number of iPhone deals for the month of April. Switch, and open a new of service, and you can qualify for a free iPhone 15 or heavy monthly discounts on other models: – 128GB... Read more

Jobs Board

Relationship Banker - *Apple* Valley Financ...
Relationship Banker - Apple Valley Financial Center APPLE VALLEY, Minnesota **Job Description:** At Bank of America, we are guided by a common purpose to help Read more
IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: Apr 9, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Medical Assistant - Orthopedics *Apple* Hil...
Medical Assistant - Orthopedics Apple Hill York Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
Liquor Stock Clerk - S. *Apple* St. - Idaho...
Liquor Stock Clerk - S. Apple St. Boise Posting Begin Date: 2023/10/10 Posting End Date: 2024/10/14 Category: Retail Sub Category: Customer Service Work Type: Part Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.