Getting the Most out of SuperCard 3.0
Ken Ray
Sons of Thunder Software
©1997 Sons of Thunder Software
What This Document Is All About
The main purpose of this document is to provide, in great detail, how to get the best performance out of SuperCard 3.0. To talk about increasing performance, one must look at the complete development environment to get an understanding of where there may be bottlenecks.
The main components for developing projects in SC3 are:
SuperEdit 3.0 ("SE") -- A compiled C application that provides an environment for editing projects where the project does not run; for all intents and purposes it is "dead".
SuperEdit is a carry over from previous versions of SC and has been updated only so far as to open and work with SC3 projects. As such, it does not allow for editing a number of SC3 specific features, such as user properties, referenced picturedata, etc.
Project Editor ("PE") -- A SuperCard project that has is a more robust editing environment that SuperEdit. It has two states; a Design Mode where a project can be edited, and a Run Mode where the project can be run and tested. The project being edited/run under the Project Editor is actually "alive", but the Project Editor intercepts incoming messages during Design Mode and handles them so the project being edited cannot respond to these messages. When the user switches to Run Mode, the Project Editor gets out of the way and allows these messages to flow freely to the user's project. The SharedFile that is installed when you first install SC3 is configured for use with the Project Editor.
The PE was designed specifically for SC3 project editing, so it provides the most robust environment for editing projects. There are a few things that cannot be done in the PE that can be done in SE (such as replacing backgrounds, editing ICON/CURS resources and editing paint objects in "fat-bits" mode).
SuperCard 3.0 ("SC3") -- A compiled C application that contains the SuperTalk interpreter for running projects. It has few user interface components and therefore its sole responsibility is to interpret and play back the projects that are created by either SuperEdit or the Project Editor. The only visual interface components of SuperCard 3.0 are the Script Editor, the Script Tracer and the Message Box.
SuperCard Player 3.0 ("Player") -- A compiled C application that is nearly identical to SuperCard, except that it has been designed as a playback environment only and access to things such as the Script Editor or Script Tracer are disabled. Projects developed in SC3 are deployed using the Player or by building a standalone with Standalone Maker (not discussed here).
In addition to the items mentioned above, there is an alternative project editing environment that is provided on the SC3 CD in the Unsupported Tools folder:
Runtime Editor ("RTE") -- This is a SuperCard project that is a carry over from previous versions of SC that allows some editing of projects at run time but makes no attempt to "control" the environment (as in the Project Editor), and it is the user's responsibility to open and close the Runtime Editor manually. Also, no messages are intercepted, so it is your responsibility to pass along certain messages that the RTE needs if you use them in your own projects (this is discussed in more detail below).
The Runtime Editor has its own SharedFile, and therefore cannot be used along with the Project Editor; it is an "either-or" situation (you either choose to use the PE or you choose to use the RTE, but not both).
The RTE has also not been updated to work with the new features of SC3, so there are quite a lot of things that cannot be edited/changed at runtime.
Methods of Running Projects
Now that you know the basic components that will be used, you can now look at two general methods of creating and running projects:
Project Editor + SuperEdit ("PE+SE")
This method means that both the PE and SE are used. SE may be used for certain tasks and the PE used for other tasks. This is the most common method, as there are some items (such as editing user properties) that SuperEdit cannot do, and other items (such as editing ICON resources) with the Project Editor cannot do.
SuperEdit -> SuperCard (w/RTE?) -> SuperEdit ("SE-SC-SE")
This method ignores the Project Editor completely in favor of using SuperEdit. Projects are created and editing in SuperEdit. When it comes time to run the project, the user chooses "Run" from the File menu in SuperEdit. The Bridger application is then launched to hold the memory slot that SE was using open and SE quits. Bridger hands the project off to SuperCard and SuperCard runs the project. When the user chooses to quit out of SuperCard, Bridger relaunches and hands the project back to SuperEdit, which launches and reopens the project.
If the Runtime Editor is used and the user's project calls it to open, it can be used to tweak projects at runtime.
Performance Issues
Although the PE+SE method provides for the most robust development, it also requires using the Project Editor ;-). Seriously, since the PE is a SuperCard project that is context-sensitive to the user's actions, quite a lot of processing goes on that can cause the PE to run slowly (especially on non-PowerPC machines). The following items will increase your performance:
1) Minimize/Eliminate Palette Updating
Every time you change the current selection in the PE, the PE must update any currently visible palettes to reflect the new selection. For example, if you have nothing selected, the card information is displayed in the Property Inspector palette; click on a button, and the button's information is displayed in the PI, along with other palettes that may be visible that need to be updated. The palettes that are automatically updated are the Property Inspector, Colors Palette, Text Palette, Toolbar and Project Browser window.
Here are a few ways to handle this:
2) Turn off the "Define name on create" option in Preferences
If you need to work quickly, you can turn off the "Define name on create" option in General Preferences. This means that when a new object is created, you will not get the dialog that asks you for the name of the object; the object will be created without a name and you can assign one later using the Property Inspector palette.
3) Bypass the Project Editor for quick testing from the desktop
If you are at the desktop and wish to run your project to test it, you can bypass the loading of the Project Editor by holding down the Command key when you double-click your project document. This will cause your project to run under SuperCard and it will not load the PE at all. Note that you'll need to quit and rerun your project normally to get access to the PE for subsequent editing.
4) Bypass the Project Editor for quick testing from SuperEdit
If you've just been editing your project in SuperEdit and wish to quickly test it, you can choose Run from the File menu instead of quitting and running your project from the desktop. If you choose Run from the File menu, SuperCard will run your project without the Project Editor. Note that when you quit, you'll be back in SuperEdit, so you'd need to quit SuperEdit and rerun your project from the desktop normally to get access to the PE for subsequent editing.
5) Use the RTE instead of the PE if the PE is still too slow
If you have used the tricks above, and the PE is still too slow for you, you can choose to use the RTE instead of the PE. Note that you should save this for last, as the RTE doesn't have half the capabilities that the PE has and cannot be used in conjunction with the PE; it must be used instead of the PE. However it is also not context-sensitive so there is minimal delays in developing your project. If you choose this method, read the section below for installing and using the RTE.
Using the RTE Instead of the Project Editor
Installation
To install the RTE, you will need to take the following steps:
1) Move the SC Pouch that contains the Project Editor (the "PE Pouch") out of the SuperCard folder and put it somewhere else.
2) CRITICAL STEP: You need to either rename, compress or delete the SharedFile that is in the PE Pouch you just moved. If you do not do this step, SuperCard will launch and will point to the moved SharedFile, giving you very confusing results. I would recommend either renaming the SharedFile in the PE Pouch to "SharedFile PE", or compressing the whole PE Pouch.
3) Copy the SC Pouch from the "Unsupported Tools" folder on the CD to your SuperCard folder.
4) With ResEdit or some other resource editing utility, open the SuperCard application and edit STR #128. It currently says "Project Editor"; delete all the text from the resource and save the SuperCard application.
Note: This seems to be an optional step, as SC runs fine with the RTE even if the STR #128 resource says "Project Editor", but for safety's sake, you should probably modify it anyway.
The RTE has its own SharedFile, and its own set of Utilities; you cannot mix-and-match Utility projects between the PE's SC Pouch and the RTE's SC Pouch.
Use
To use the RTE, you need to open it with a call using the keyword editor, and one of the following three parameters: full, menu or pal. These correspond to the three possible RTE states: a "full menu" state, where it takes over the menu bar (editor full), a "single menu" state, where the menus of the RTE are displayed in a single menu in the menubar called "Editor", and choices are made via submenus (editor menu) and a "palette" state, where a floating palette contains hierarchical popup menus that provide the menu selections (editor pal).
Note: The RTE works in tandem with the RTE's SharedFile such that when an object is double-clicked with the pointer tool, the doubleClickGraphic (button, field, etc.) message is trapped by the SharedFile and rerouted back to the RTE, which then opens the appropriate "Info" dialog for the object you double-clicked. Because of this, if your project traps these messages, the "Info" dialogs will not be displayed unless you choose to pass the message.
Caveats and Comments
First of all, the RTE is not supported by Allegiant Technologies, and if you choose to use it, you use it at your own risk (not that there really IS any risk, but you get the picture).
Using the RTE will not give you an interface to SuperCard 3.0 items (such as "show invisibles", user properties, referenced pictureData, and the like).
It is also not "context-sensitive", that is, you can make menu choices for inappropriate objects instead of being prevented from such action by having the menu items disabled. This makes the RTE faster (since it doesn't have to figure out what's going on), and you are informed by a beep sound if you make an improper selection (such as having no object selected and choosing "Group").
The RTE does not have two environments (Design and Run) like the PE does; you are always in "run" mode. The RTE attempts to coexist peacefully with your running projects, and you may choose specific configurations of the RTE for special instances. For example, if your project hides the menu bar, you would want to choose the "palette" form of the RTE. If you were doing a lot of things with menus, you might want to use the "single menu" form.
In Closing
I hope this document has helped shed some light on how to get the most out of SuperCard 3.0. If you have any questions or comments, please voice them to one of the two people listed below:
Ken Ray
Sons of Thunder Software
1485 N. El Molino Ave.
Pasadena, CA 91104
(818) 798-7928
Email: SonsOThndr@aol.com
SuperCard is a registered trademark of Allegiant Technologies, Inc.