Make your own free website on Tripod.com

Book Cover PictureAppleScript Applications

Building Applications with FaceSpan and AppleScript

By John Schettino and Liz O'Hara

ISBN: 0-12-623957-6

Published by AP Professional

AP Professional books are available in major bookstores. Books may also be ordered directly from AP by calling 1-800-3131-APP

This book shows the reader how to create complete Macintosh applications using AppleScript and the FaceSpan interface builder. It includes detailed examples that are developed over the course of the book. The reader is lead through the use of the FaceSpan interface designer, introducted to the AppleScript language, and shown how to design and script complex Macintosh applications.

Paperback/CD ROM enclosed--Macintosh

550 pages

Publication Date: September 1996

Price: $34.95


Contents

Chapter 1-Introduction

AppleScript and FaceSpan
What Is Scripting?
More Than HyperCard
AppleScript and FaceSpan Environment
Object-Oriented
Graphical
Distributed
Who Should Read This Book
System Requirements
Installing AppleScript
Installing FaceSpan
Example Projects on the CD-ROM
Conventions Used in This Book

Chapter 2-Getting Started with FaceSpan

Not Just a Pretty Face
What You Can Do with FaceSpan
Build Applications That Are Mac-like
Construct Prototypes
Create Your Own Reusable Application Library
Develop Integrated Applications
It's Easier Than You Think
Projects and Applications
Project Document
Application/Miniature Application
Droppable Application/Miniature Application
Run-Only Application/Miniature Application
Objects and Resources
Applications
Windows
Window Items
Menus
Menu Items
Artwork
Forms and Other Resources
Storage Items
Scripts
Overview of the FaceSpan Environment
Project Management
Editors
Scripting and Testing Tools
An Approach to Building Applications
Lay Out the Interface
Test the Interface
Add Behavior to the Interface
Test the Application
The Averages Calculator Application
Lay Out the Interface
Test the Interface
Add Behavior to the Interface
Test the Application

Chapter 3-The AppleScript Language

A Simple Handler Explained
Statements: The Building Blocks of Scripts
Simple Statements
Compound Statements
Parts of a Statement
Data Value Classes
Properties
Operators
Coercions
Reference Forms
Elements
Commands
Literals
Variables
Variable Names
Local Variables
Global Variables
Property Variables
Operators
Operator Precedence
Object References
Object Reference Forms
Element Reference Forms
Control Statements
If..Else..End If
Repeat..End Repeat
Tell..End Tell
Script Objects
Commands
Core AppleScript Commands
Scripting Addition Commands
Application Commands
Handlers
Declaring Handlers
Calling Handlers
Error Handling
Try..On Error..End Try Statement
Error Command

Chapter 4-Building Multi-Window Applications

Commonly Used FaceSpan Event Messages
Determining an Application's Handlers
Handlers for FaceSpan Event Messages
Handlers for User-Defined Commands
A Revised Approach to Building Applications
The Quick Notes Application
View a List of Saved Notes
Create New Notes
View/Edit Notes
Delete Notes
Additional Considerations
Lay Out and Test the Interface
The Notes Manager Window
The Note Window
The Unsaved Changes Modal Dialog
The Delete Confirmation Modal Dialog
The Duplicate Name Modal Dialog
The Apple Menu
Add Behavior to the Interface
The Notes Manager Window
The Note Window
The Project Script
Test the Application
An Introduction to Object-Oriented Scripting

Chapter 5-Building Applications with Objects

Classes and Objects
Class Hierarchy
Anatomy of an Object
Properties
Commands
Event Messages
AppleScript Objects
Extending Default Properties and Behavior
Kinds of AppleScript Objects
Container Objects
Application Objects
Internal Objects
Object Communication
The FaceSpan Message Hierarchy
AppleScript Messages
An Object-Oriented Approach
Lay Out the Interface
Add Behavior to the Interface
Implement Windows as Templates
The Quick Notes Plus Application
Lay Out and Test the Interface
The Note Window
The File Menu
The Window Menu
Add Behavior to the Interface
The Notes Manager Window
The Note Window
The Note Internal Object
The Project Script
Test the Application

Chapter 6-Graphical User Interface Design

The Interface Is the Application
Face First
Guidelines for Interface Design
Follow the Macintosh Way
Emulate Your Favorite GUIs
Simple Is as Simple Does
Know Your Users
Provide Feedback
Be Consistent
Provide Navigational Aides
Permit Reversible Actions
Reduce What Users Must Remember
Support Mousing Around
Use Smart Interface Objects
Script Defensively
Design for Novices and Experts
Give Users Control
Interface Design with FaceSpan
Window Design
Titling
Placement and Size
Growth
Layering and Ordering
Closing
Aesthetic Factors
Private Menus
Window Item Design
Forms, Formats, and Other Resources
Labeling and Titling
Placement and Size
Growth
Sensitivity to User Interaction
Aesthetic Factors
Balloon Help
Menu Design
Standard Menus
Ordering
Naming
Private Menus
Popups
Menu Item Design
Naming
Ordering and Grouping
Marking
Toggling
Sensitivity to User Interaction
Interface Design with Scripting Additions
Choose File
Choose Folder
Display Dialog
New File

Chapter 7-Advanced Applications

Date Minder Tour
Critique of the Date Minder's Interface
The Good News
The Not-So-Good News
How to Build a Large Application
Library Components
Stand-Alone Applications
New Components
A Universal Window Menu
Window Menu Property
Window Menu Handlers
Scrolling Panes
Drag-and-Drop
Drag Event Handlers
Drop Event Handlers
Dynamic Window Items
Create Window Items Dynamically
Move Window Items
Delete Window Items
Handle Dynamically Created Window Items' Event Messages
Direct Manipulation

Chapter 8-Error Handling and Debugging

Defensive Scripting
Input Validation
Selection Validation
Arithmetic Validation
Error Handling with try..on error..end try
General Error Handling
Specific Error Handling
Nested Error Handling
Debugging
Use Play Mode to Test Handlers
Display the Script Name, Location, and Type of Error
Send Messages
Use Event Tracing and Value Logging
Using the display dialog Scripting Addition

Appendix A-FaceSpan Objects and Resources

Organization of This Appendix
Alphabetical List of Commands
Alphabetical List of Event Messages
Applications
Reference Forms
Properties
Commands
Event Messages
Windows
Reference Forms
Properties
Commands
Event Messages
Window Items
Reference Forms
Properties
Commands
Event Messages
Box
Properties
Commands
Event Messages
Checkbox
Properties
Commands
Event Messages
Gauge
Properties
Commands
Event Messages
Graphic Line
Properties
Commands
Event Messages
Icon
Properties
Commands
Event Messages
Label
Properties
Commands
Event Messages
Listbox
Properties
Commands
Event Messages
Listbox Item
Movie
Properties
Commands
Event Messages
Pictbox
Properties
Commands
Event Messages
Popup
Properties
Commands
Event Messages
Push Button
Properties
Commands
Event Messages
Radio Button
Properties
Commands
Event Messages
Table
Properties
Commands
Event Messages
Table Rows
Table Columns
Table Cells
Textbox
Properties
Commands
Event Messages
Menus
Reference Forms
Properties
Commands
Event Messages
Menu Items
Reference Forms
Properties
Artwork
Reference Forms
Properties
Form Resources, Etc.
Control Definitions (CDEFs)
List Definitions (LDEFs)
Menu Definitions (MDEFs)
Keys
Storage Items
Reference Forms
Properties

Appendix B-FaceSpan Reference

Launching FaceSpan
Project Management
Project Window
Project Icon
Project Script Button
Run Button
Project Window Listbox and View Radio Buttons
Project Window Buttons
Project Management Tasks
Create a New Project
Create a Default Project
Open an Existing Project or Editable Application
Save a Project
Revert a Project
Run and Stop a Project or Application
Create Window Templates, Menu Templates, and Storage Items
Import Resources
Delete Items
Cut, Copy, and Paste Items
Access the Project Script
Access the Editors
Window Editor
The Property Bar
The Tool Palette
Menu Editor
The Menu Template
Menu Editor Tasks
Default Menu Templates
Storage Item Editor
Storage Item Name Textbox
Storage Item ID
Check Syntax Button
Storage Item Value Textbox
Cancel Button
OK Button
Script Editor
Record Script Button
Handlers Popup
Properties Popup
Window Items Popup
Check Syntax Button
Script Textbox
Scripting Language Popup
Artwork Chooser
View and Edit Information about Artwork
Import Artwork
Delete Artwork
Copy Artwork between Projects
Form and Resource Chooser
View and Edit Information about a Resource
Import a Resource
Delete a Resource
Copy a Resource between Projects
Message Windoid
Message Log
Event Log
Dictionary Windoid
Applications Popup
Objects Popup
Events Popup
FaceSpan Menus
Apple Menu
File Menu
Edit Menu
Window Menu
Script Menu
Object Menu
Font Menu
Style Menu
Sizes and Limits
Reserved Words

Appendix C-AppleScript Reference

Data Value Classes
Boolean
Class
Constant
Data
Date
Integer (or Number)
List
Number
Real (or Number)
Record
Reference
SCRIPT
String (or Styled Text, or Text)
Operators
Statements
Commands
AppleScript Commands
Scripting Addition Commands
Application Commands
Error Messages

Appendix D-What's on the CD-ROM

AppleScript 1.1
FaceSpan 2.1
Example Applications
Demonstration Software
Shareware Scripting Additions
Freeware Scripting Additions
Scriptable Shareware Applications
Scriptable Freeware Applications
Applications Built with AppleScript
ScriptWeb

Appendix E-Index

Return to John Schettino's home page