Prograph 2.5
Volume Number: 8
Issue Number: 1
Column Tag: Tools of the Trade
Fully System 7 compatible with a Database Engine that will make you
drool!
By Terry Kilshaw, Kelowna, British Columbia
Terry Kilshaw is a free-lance consultant, writer and programmer who also
teaches Prograph and HyperCard programming. He has been designing and
implementing software systems since 1979 and spent three and a half years as
Manager of Software Development with TGS Systems. His current interests lie in the
areas of multi-media programming and old-growth forest preservation. He can be
reached at (604) 762-4451]
A Bit of History
After five years of research in two Canadian universities and a further year and
a half of commercial development, Prograph 1.0, consisting of the integrated
Editor/Interpreter/Debugger, was released in October of 1988. A new entrant in the
field of Data-Flow, Visual and Object-Oriented programming, Prograph was
immediately recognized as innovative, but its real signi-ficance was not at first
grasped. Macintosh users had seen Object-Oriented languages, such as SmallTalk and
Pascal, before. They had seen visual languages like V.I.P., and those had their
problems. But what they had not yet seen was a seamless, object-oriented development
environment where the code was a data-flow diagram and editing, execution and
debugging could all happen simultaneously. Surely on a visual machine such as the Mac
there should be a visual way of programming! And here it was.
Prograph 1.1 appeared in March of 1989 and brought numerous additions, new
primitives and refinements to the control annotations and the System Classes and
integrated application editors. System Classes, which represent the major interface
building blocks of Application, Menu, Window, Button, Scroll List and so on, with
WYSIWYG Window and Menu editors and dialogs for specifying details for window items,
gave Prograph essentially the same capabilities as products like Prototyper and
AppMaker. But those products just churned out C or Pascal code at the rear end.
Prograph integrated these capabilities directly into the editing and execution
environments.
In September of 1989, the first “real” release of Prograph, version 1.2, was
made. In addition to a tutorial and reference manual and many sophisticated examples,
Macintosh Toolbox access was extended to cover almost everything in Volumes I through
IV of Inside Macintosh. The product came nicely packaged and, for the first time, was
available from the big mail-order houses. It also won a MacUser Eddy award as the best
programming tool for 1989, a Canadian Information Processing Society (CIPS) award
for innovation, and a Nova Scotia Pinnacles award.
The last day of July 1990 saw the release of Prograph 2.0. The big news here
was a compiler which produced native 680x0 code. Like the Prograph Editor, the
Compiler was fully graphical. Icons represented Prograph source code files, MPW C and
THINK C object files, libraries and resource files. The Editor/Interpreter had been
further refined. The HyperText-like on-line help capabilities were extended and Inside
Macintosh Volume V definitions added. The ability to call HyperCard XCMDs using CEL
software’s XLink rounded out a maturing product.
The Highlights
2.5 is System 7 compatible. It knows all about Inside Macintosh Volume VI. It can
use TextEditStyle records and TrueType outline fonts. There are small, but significant
changes to the System Classes, including a Pop-up Menu class. Method compaction is
now available in the interpreter, cutting the size of a method by up to 75%. Users can
now get their hands on events before they are processed and, most important of all, it
comes with a Database Engine.
Promised as add-ons, coming soon, (corporate programmers and consultants
take note), are support for the Communications Manager, for DAL and for Oracle. For
those of us who have C or Pascal libraries just crying out for a Macintosh-like front
end, TGS Systems will be offering tools which programmers can use to define the
interfaces to their own libraries, so that they can be called directly from Prograph
code.
And now to the details.
System 7 Support
The new Prograph is 32-bit clean and can run in 24- or 32-bit mode, which
among other things presumably means that it will also run under A/UX. If users follow
Apple guidelines for their own applications and do not mess directly with master
pointers or the variant code of window and control definitions, then applications
produced with the Prograph compiler will also be 32-bit clean.
It supports TrueType outline fonts which look quite excellent and also
implements the use of TextEditStyle records.
Prograph itself is Stationery aware and responds appropriately to Apple Events.
In addition to the required set of Open Application, Open Documents, Print Documents
and Quit Apple Events, the Prograph interpreter also responds to Open Window, Close
Window and Do Menu Apple Events. A clever addition to the Application Editor allows
programmers to specify a list of Apple Event classes and IDs that their application will
respond to, and to associate each Apple Event with the name of a Prograph method. All
events, low level, high level and Apple are now passed through to applications. For
more details on the new event response mechanism see below.
Balloon Help is available in the Editor/Interpreter and the Compiler and tools
are supplied for adding Balloon Help to your own applications.
New Event Management
In previous releases the events which were sent to a programmer’s application
were limited. Internal Prograph code, which the programmer could not get his or her
hands on, received an event, determined if it was one of the subset of events which
should be dispatched to a user’s program, looked in the appropriate System Class to see
if the name of a method had been specified by the programmer and dispatched the event
to that method.
In 2.5 that has all changed. Now all events are passed to a method called notify in
class Application. Users can, of course, write their own version of notify, but Prograph
comes with a default set of event handling methods.
notify is a method with three inputs and 8 cases. The first input is the instance of
the current Application class, the second the Mac EventRecord, and the third the
current event ID. Each case deals with a different class of events as follows:
• Null events