Text preview for : 04_Lisa_Toolkit_Self-Paced_Training.pdf part of apple 04 Lisa Toolkit Self-Paced Training apple lisa toolkit_3.0 Package_2_Examples 04_Lisa_Toolkit_Self-Paced_Training.pdf



Back to : 04_Lisa_Toolkit_Self-Pace | Home

LISA TOOLKIT
SELF-PACED TRAINING
Preface.

This self-paced training comprises eleven self-study segments. The intent of
these segments is to get you started designing applications with the ToolKit.
Although the initial segments have no code associated with them, the latter
segments include labs allowing you to experiment with actual appl ication code.
A single application is used as the context for this training. This is the Boxer
appl ication. Boxer is implemented in stages over 8 of the eleven segments. The
result is an application that exhibits the essential features of typical ToolKit
appl ications. What those are is the subject of this training.


CONTENTS
The following table I ists the segments, labs, and the code associated with
them:
segftent
nuftber seQ~ent na~e lab code stage
Conceptual Foundation of the ToolKit no
1 Introduction to the ToolKit no
2 What is a Document? no
3 Creating from the Generic Application yes 1Boxer
4 BlankStationery no
5 Intro to the Boxer Appl ication yes 2Boxer
6 Selections and Highl ighting in Boxer yes 3Boxer
7 Mov i ng Boxes yes 4Boxer
8 Creating a Box, A Second Selection Class yes 5Boxer
9 Recoloring .. Dupl icating.. and Clear All yes 6Boxer
Commands with Undo
10 Filters yes 7Boxer
11 Cut & Paste and Mouse Key Events yes 8Boxer
as Commands; Advanced Commands.


The recommended sequence of segments is to start with "Conceptual
Foundation of the ToolKit", and then continue sequentially with segments 1 through
11.
PREREQUISITES
You are expected to have read the following documents before starting this
self-study:
o Introduction to Clascal
o WorkShop Manual, especially the QuickDraw and Pascal language
sections


To your future as II grellt ToolKit IIPPlic4tion designer!
Conceptual Foundation of
the ToolKit

The ToolKit is en object-orierKlNi development system. This means that the
. code to be executed is selected through the data, which is packaged into record-like
constructs called Db~cts. This is in direct contrast to a procedure-oriented system.
In that kind of' system the code to be called is tixed by the designer. The data must
fit the celled code, rather than vice versa.

The following discussion and slides provide a conceptual foundat ion for an
object-oriented system, and how it contributes to the structure of' the ToolKit.




Conceptual Foundations
TLJ The ToolKit is best described as a collection of interlocking hiererchies of
classes. One special ToolKit class, TObject, is the ancestor of every other class.
As the slide: The TooJ~~':jt ltpp/ieMi()f1 ,.1odtl showS, a user application is a
collection of classes as well. Specifically it is 8 layer of' class hierarchies descended
from those of the ToolKit.
The user application 18y'er may either abut the ToolKit l~er directly, or have
one or more building block layers of insulation. In either case, the user application
may create subclasses from any classes in or above its layer.
(The lsyered lIPproach is 1J}Sf) l1JustrBted in a generBl wa}" in the slide: The
ToolKit _~pDJjc8tion Design ,..fodel.)


TPROCESS
From an application's point of view, one class has especial significance -
TProcess. An application must define its own subclass or TProcess (TAppProcess in
the slide). It is only through that subclass that the ToolKit is able to establish
access to the user application's code.
The first application object created must be one descended from TProcess.
That object initietes the creation of every other object in the application. Only if the
process object is of your subclass, will it be able to create and reference instances
of yOl4" clesses.
The mechanism uses the teet that all or TProcess's methods are inherited by
the subclass. The subclass only needs to override one method to provide access to
the rest of the application's classes.

11-E GENERIC APPUCATION
The Generic Application is the epplicetion defined by the methods of the
ToolKit's clesses. The Generic Application initiates method calls to your methods
through objects of your clesses. This is illustreted in the slide: How APDjic8tion
Code Gets Called.
The primary responsibility 01 the Generic Application is to route user events,
such as mouse downs or keypresses to appropriate methods of your 8Pplication. It
processes all user-generated events directly, freeing you from having to code tedious
input/output processing. This also insures that 811 i/o will be handled consistently
from one ToolJ. Most significently, the Generic Applicetion imperts ste.nderd behavior to user
applications. What it does specifically and how it does this is the subject of the
"ToolKit Self-Paced Training".




Conceptual Foundations
The ToolKit Application Model
. (an intricate hierarchy)
ToolKit Classes
(UOlajtct 6 Generic Appliccrtion)