Notices
Trademarks
About this book
What this book includes
Who this book is for
About this product
Conventions used in this book
What's new in this version?
Changes to this guide
Changes to the development environment
Tell us what you think
Getting started
Introducing the Smalltalk development environment
The IBM Smalltalk development environment
Starting your product
Using a Transcript or Workspace window
Text editing
Evaluating Smalltalk expressions
Browsers in the base environment
A guided tour: Creating your first Smalltalk application
The Applications Browser
Method visibility
Creating the application
STCalculatorApp
Creating the class
STCalculator
Defining the class
Adding the method
open
Testing
STCalculator
Finishing the
open
method
Finishing the user interface
Fixing errors
Browsing
CwRowColumn
Adding functions
The Classes Browser
Adding the remaining methods
Debugging the calculator
Introducing the Debugger
Tidying up the
Calculator
application
Extending another class
Categorizing methods
Public and private methods
Checking prerequisites
One last change
Ending the tour
System architecture
Image
Library
Loading and unloading components
Starting your image
Starting from the desktop
Starting from a command line
Recovering the command line
Image files
Saving an image to keep components loaded
Using the Save Image option
Using the Save Image As option
Saving upon exit
Components
System components
Software components
Classes
Defined classes
Extended classes
Visible classes
Public classes and private classes
Methods
Viewing methods
Method categories
Applications
Applications group classes
Applications relate to other applications
Subapplications
Configuration maps
Getting started with team concepts
Version control
Editions
Versions
Scratch editions
Change and access controls
Component ownership
Application groups
Change controls
Access controls
Configuration management
Application lineups
Configuration map lineups
Releasing
Organizing your team
Assigning team roles
Starting a project
The generic development process
Naming your components
Developing classes and creating individual baselines
Creating baselines as a team
Making your own applications
Creating applications
Creating applications--The basic steps
Example: Creating the application
DevelopChooser
Setting application prerequisites
Checking prerequisites
Changing prerequisites
Defining group members for your application
Adding group members
Deleting group members
Assigning an application manager for your application
Assigning owners for classes
Defining classes
Defining a class--The basic steps
Using an existing class as a template
Using menu options
Example: Defining the class
Chooser
Ensuring that the class you are subclassing from is visible
Creating a subclass
Adding variable declarations
Implementing methods
Implementing methods--The basic steps
Example: Adding methods to the defined class
Chooser
Implementing the method
open
Implementing the remaining ten methods
Opening
Chooser
Ensuring that
Chooser
loads with
DevelopChooser
Extending defined classes
Creating a class extension: The basic steps
Example: Extending the class
Object
Example: Adding the method
needsMoreWork
to your class extension
Creating subapplications
Creating subapplications: The basic steps
Example: Creating the subapplication
DevelopStopwatch
Creating a subapplication component
Defining the subclass
Stopwatch
Implementing methods for
Stopwatch
Opening the window
Completing work on your subapplication
More practice: Creating
DevelopTextEditor
and
DevelopTimeLogger
A shortcut: Copying code into a browser
If you want to skip this practice...
Example: Creating
DevelopTextEditor
Creating an application component for
DevelopTextEditor
Defining the class
TextEditor
Implementing the private instance methods
Example: Creating
DevelopTimeLogger
Creating an application component for
DevelopTimeLogger
Defining the class
TimeLogger
Implementing the public instance methods
Implementing the private instance methods
Copying methods into
TimeLogger
Using the enhanced browsers (TrailBlazer)
Loading TrailBlazer
Opening TrailBlazer
Returning to the standard browsers
Example: Using TrailBlazer to create
DevelopScreenCapture
Creating an application component for
DevelopScreenCapture
Changing prerequisites
Example: Defining the classes
ScreenPMCapture
and
ScreenWinCapture
Creating a subclass
Adding variable declarations
Example: Implementing methods for
ScreenPMCapture
and
ScreenWinCapture
Implementing the private instance methods
Opening an instance of the screen capture tool
Categorizing the methods
Copying methods to the other platform-specific class
Example: Enabling a Display Image push button
Inspecting and debugging code
Inspecting objects
Using an Inspector
Inspecting variables
Evaluating expressions in the value pane
Changing variables
Using a Dictionary Inspector
Inspecting some dictionaries in the system
Inspecting your own dictionary
Adding and removing dictionary keys
Using a Basic Inspector
Debugging code
Opening a debugger and examining its contents
Determining the cause of an error
Finding errors in evaluated expressions
Finding errors in nonevaluated code
Examining a message stack
Inspecting variables from a debugger
Correcting errors from a debugger
Changing a method in the description pane
Changing an inspected object's variables and values
Adding breakpoints and executing code step-by-step
Adding the message halt
Adding breakpoints using menu options
Executing messages individually
Watching value changes
Browsing information on entries in a message stack
Generating an error report
Setting debugger options
Common errors to watch for
Messages not understood
Missing separators
Mismatched brackets or parentheses
Handling software components
Moving classes and methods
Moving classes between applications
Preconditions
Steps
Example: Making
DevelopStopwatch
into an application
Moving methods between classes in the same application
Preconditions
Steps
Moving methods between classes in different applications
Preconditions
Steps
Deleting components
Deleting classes
Prerequisites
Steps
Example: Deleting the class extension from
DevelopChooser
Deleting methods
Steps
Deleting applications
Deleting subapplications
Deleting a subapplication from one lineup
Deleting a subapplication from many lineups
Deleting application prerequisites
Deleting a prerequisite from the lineup in your image
Deleting a prerequisite from a lineup not in your image
Deleting a prerequisite from all lineups
Filing out and filing in components
What is the IBM Smalltalk format?
Example: Examining the format of filed-out code
Filing out components
Filing in components
Filing in components stored in the generic format
Example: Renaming a class and changing its methods
Handling team software components
Loading components from a library
Loading components: The process
Loading classes
Steps
Loading methods
Steps
Loading applications
If you know what application you want to load
If you do not know what application you want to load
Loading subapplications
Preconditions
Steps
Loading configuration maps
Example: Loading a configuration map
Unloading components from your image
Unloading classes
Preconditions
Steps
Unloading applications
Preconditions
Steps
Unloading subapplications
Preconditions
Steps
Unloading configuration maps
Creating new editions of existing components
Creating editions: the process
Creating class editions
Preconditions
Steps
Example: Creating a class edition
Creating application or subapplication editions
Preconditions
Steps
Example: Creating an application edition
Creating configuration map editions
Preconditions
Steps
Displaying configuration map timestamps
Loading other editions of components already loaded
Loading editions: The process
Loading class editions
Steps
Loading method editions
Preconditions
Steps
Loading application editions
Preconditions
Steps
Loading subapplication editions
Steps
Loading configuration map editions
Comparing editions
Comparing applications contained in two editions of a configuration map
Example: Comparing two editions of a single configuration map
Comparing classes contained in two application editions
Comparing methods
Comparing methods used by two class editions
Comparing two editions of one method
Comparing two methods used by one class
Comparing editions of two different configuration maps
Creating versions of components
Creating class versions
Preconditions
Steps
Example: Creating a class version
Creating application versions
Preconditions
Steps
Example: Creating an application version
Creating configuration map versions
Preconditions
Steps
Example: Creating a configuration map version
Releasing components
Releasing classes
Preconditions
Steps
Example: Releasing a class
Releasing applications
Preconditions
Steps
Replacing application editions or versions
Adding new applications to a configuration map
Releasing subapplications
Preconditions
Steps
Grouping applications using configuration maps
Creating configuration maps: The basic steps
Adding new applications
Replacing applications
Deleting applications
Adding, replacing, or deleting applications with TrailBlazer
Example: Creating the configuration map Chooser Map
Defining lineups for multiple platforms
Application lineups
Defining application lineups: The process and preconditions
Example: Defining application lineups for OS/2 and Windows
Configuration map lineups
Defining a configuration map lineup: The process and preconditions
Example: Adding a required map to a Chooser Map lineup
Replacing required map editions or versions in a lineup
Importing components
Preconditions
Importing user objects
Importing class versions
Importing application or subapplication versions
Steps
Importing configuration map versions
Exporting components
Preconditions
Exporting user objects
Exporting class versions
Exporting application or subapplication versions
Steps
Exporting configuration map versions
Setting exporting options
Steps for exporting configuration maps
Attaching non-Smalltalk files
About attachments
Attachment folders
Attachments and stored path names
Attachment types
No versioning of attachments
Opening the Application Attachments browser
Using the Application Attachments browser
Storing attachments
Retrieving attachments
Browsing attachments
Browser menu choices
Stored path names
How stored path names are derived
How stored path names are displayed
Supported platforms and file system types
Performing team system administration
Library operations
Creating libraries
Giving users access to libraries
Adding a user object to a library list
Changing to a different user object
Changing default libraries
Purging and salvaging components
Purging user objects
Purging applications and subapplications
Purging configuration maps
Cloning libraries
Recovering from crashes
Recovering from a file server or EMSRV crash
Recovering from image crashes
What the system checks
Invoking the check for consistency
Recovering lost components
Packaging, unloading, and analyzing code
Introduction to packaging
Packaging guidelines
Application prerequisites
Method dispatch
Class/global access
Accessing development environment information
Files to distribute with your application
Simple packaging
What to do before packaging your application
Running the packager
Possible problems
Running your packaged image
Advanced packaging
Packaging: An overview
Packaging terminology
Advanced packaging: The process
Summary of packaging steps
Detailed packaging procedure
Making applications "packager friendly"
Application centered packaging
Application packaging hints
Reducing the size of your packaged image
Reducing the number of classes and methods
Minimizing other objects in the packaged image
Unloading ENVY/App image components
Limitations
Unloading specific components
Applications
Classes
Compiled methods
Class variables
Class instance variables
Shared pool variables
Global variables
Unlinking all instances of a specific class
Example: Unlinking all instances of a class
Unlinking all instances of a specific method
Excluding version information
Setting the image startUp class
Running code at load time
Example: Specifying the class and selector to be run
Packaging with image components (ICs)
About ICs
Image components (ICs) and their benefits
Things to Consider: When to use ICs
Packaging preparation
Step-by-step examples building VisualAge ICs
Creating a leaf IC
Creating a reusable and a leaf IC
Creating ICs to be explicitly loaded
Creating a platform-dependent IC
Creating the ICs
Implementation issues and tips
Understanding packaging instruction classes
Snapshot classes and snapshot IDs
How snapshot files are located
Caches
Troubleshooting
Exit due to error: 33--Could not open image file
Exit due to error: 37--Image file is not an image
Problems during packaging
Side effects of using the -r command line option
Error attempting to load into a read-only object
Primitive failures during explicit IC loading
Errors during IC packaging
Reference to excluded pool
Excessive packaging time
Evaluation images
Runtime error at startup
Development image fails to start-up (Error 33)
Loading and unloading ICs
Customizing the icon and splash screen
Changing the icon
Providing a customized splash screen
Displaying the splash screen longer
Swapping objects between disks and images
Getting started
Simple object loading and unloading using files
Object loading and unloading using streams
Features of the Swapper
Basic features
Advanced features
Using the Swapper
Simple object loading and unloading
Object replacement
Object mutation
Application considerations
CompiledMethods
Classes and Metaclasses
Special object considerations
Rehashing of collections
Limitations
Error processing
Where errors are generated
Error codes and their expected error objects
Debugging Swapper operations
The Swapper framework
Replacers and strategies as first class objects
When to define your own strategies
Analyzing the runtime performance of code
Quickly determining how long it takes code to run
Example: Having
millisecondsToRun:
display your code's run time
Analyzing code using the Benchmark Workshop
Writing the bench method
Overview of the Benchmark Workshop
Executing the bench method
Stabilizing the benchmark
Viewing the results
Browsing the time distribution
Browsing the method execution
Limitations when sampling [S]
Optimizing Smalltalk code
Using a Memory Monitor
Types of memory space that you can monitor
Interpreting the Memory Monitor display
Using a Memory Use Report
Memory usage by application, class, and method
Memory usage by application, class, and method
Memory usage during execution
Setting up, customizing, and extending the system
Setting up configuration files
Library access parameters
Example library access configurations
Image component (IC) mapping
Bitmap path
NLS path
Overriding Locale settings
NLS recognition
Virtual machine options
Setting up Smalltalk images
Using Preferences Workspace to configure images
Example: Evaluating an expression to change a setting
Namespace support
Namespaces
Scope rules
Namespace management
Declarations
Declaration methods
Declaration syntax
Working with declaration methods
Why use declaration methods?
Where to declare?
When several applications contribute to a pool
Placement of declarations
Platform-dependent declarations
Adding, deleting, and changing declarations
Finding declaration methods
Correcting declaration errors
Loading previous editions of applications that do not have declaration methods
File-out format
Extending the system
Changing Transcript menus
Methods that add or remove menus
Application initialization
Application behavior when starting and stopping the system
Example: Using
startUp
to open
DevelopChooser
when the system starts
User fields
Stored objects
Storing versions of objects in object stores
Index