Expanded Notices
Trademarks
Expanded About this book
What this book includes
What's new in the Smalltalk Programmer's Reference?
Who this book is for
About this product or feature
Conventions used in this book
Expanded References
Common Language Data Types, Common Language Implementation, and Common Process Model
Common File System
Common Graphics
Common Widgets
Common Printing
Dynamic Data Exchange
National Language Support
Tell us what you think
Expanded IBM Smalltalk overview
Expanded Base subsystems
Common Language Data Types
Common Language Implementation
Common Process Model
Common File System
Common Graphics
Common Widgets
Extended Widgets
Drag and Drop
Common Printing
Design intent
Architecture
Industry-standard support
Platform support
Expanded Common Language Data Types
Expanded Object behavior
Basic dependents mechanism
Behavior testing
Class identity testing
Copying
Printing and storing
Performing
Error handling
Primitive accessing
Mutating
Testing object equality or identity
Expanded Boolean classes
Boolean messages
Expanded Collection classes
Collection protocols
Common collection protocols
Unique collection protocol
Expanded Magnitude classes
Magnitude comparing
Association
Character
Date
Time
Number
Integer
Fraction
Float
ScaledDecimal
Expanded Graphical classes
Point
Rectangle
Expanded Stream classes
Accessing
Copying
Enumerating
Positioning
Reading
Testing
Truncating
Writing
Creating instances
Expanded Support classes
UndefinedObject
Message and DirectedMessage
Block
Expanded Exception handling classes
ExceptionalEvent
Signal
Creating new exceptions
Signaling an exception
Handling of exceptions
ExceptionalEvent collections
Completion blocks
Default exception handler
System exceptions
Examples of exception handling
Expanded Common Language Implementation
Expanded Behavior messages
Class queries
Compiling
Creating instances
Enumeration
Instance accessing
Instance structure testing
Method accessing
Method adding and deleting
Method queries
Expanded Class messages
Class variable accessing
Instance variable accessing
Shared pool accessing
Class accessing
Initializing and removing
Superclass accessing
Expanded Metaclass messages
Accessing
Expanded Creating new classes
Creating fixed classes
Creating variable classes
Creating variable byte classes
Expanded Extended classes
Multiple instance accessing
String converting
Expanded Compiling and evaluating code
Compiling
Evaluating
Expanded CompiledMethod
Accessing
Testing
EmSystemConfiguration
Expanded Common Process Model
Creating a process
Suspending, resuming, and ending a process
Setting and modifying process priorities
Expanded Synchronization using semaphore and delay
Block evaluation methods
Process-related block methods
Process methods
ProcessorScheduler methods
Delay class and instance methods
Semaphore class and instance methods
Expanded Common File System
Expanded Accessing the capabilities of the Common File System
Basic file protocols
Stream protocols
Portability protocols
Error handling protocols
CfsConstants pool dictionary
Basic classes
Expanded Specifying file names and paths
Portable file names
File system roots
Path separators
Expanded Managing files and directories
Current working directory
Creating and removing directories
Deleting files
Renaming files
Copying files
Setting the timestamps of a file
Startup directory
Expanded Obtaining volume information
Volume name and type
File names and directory path case
File name length
Volumes with different file name lengths
Expanded Searching directories
Opening a directory for searching
Reading directory entries
Closing the directory descriptor
Expanded Using file streams
File stream classes
Opening and closing file streams
Reading and writing file streams
Characters versus bytes
Line delimiters
Expanded Using low-level file operations
Opening files
Closing file descriptors
Reading and writing data
Changing the file offset
Other low-level operations
Expanded Mixing streams and file descriptors
Using access modes and flags with file streams
Performing low-level file operations on streams
Expanded File locking and share modes
File locking
Share modes
Expanded Handling errors
Suppressing system error dialogs
Expanded Testing existence and obtaining other file properties
Obtaining a CfsStat instance
Expanded Mixing platform-specific and Common File System operations
Performing a platform-specific call with a CfsFileDescriptor
Converting a platform file descriptor into a CfsFileDescriptor
Obtaining platform-specific error information
Expanded Common Graphics
X Window system graphics library compatibility
Core Common Graphics class hierarchy
Seldom-used and abstract classes
Expanded A simplified drawing process overview
Before drawing
During drawing
After drawing
A simple example of the drawing process
CgConstants pool dictionary
Expanded Using graphics contexts
Basic graphics context methods
Creating graphics contexts
Copying graphics contexts
Changing graphics contexts
Freeing graphics contexts
Using graphics contexts with other drawables
Expanded Drawing operations
Drawing points
Drawing lines
Drawing rectangles
Drawing polygons
Drawing arcs and circles
Drawing pie slices and chords using filled arcs
Expanded Using fonts
A simplified view of the font process
Querying the system for fonts
Loading fonts
Assigning fonts for use in drawing operations
String drawing operations with fonts
Releasing CgFonts and CgFontStructs from memory
Obtaining the current font from a graphics context
Expanded Using cursors
The process for using cursors
Font cursors
Glyph cursors
Pixmap cursors
Changing the color of a cursor
Platform cursors
Expanded Using pixmaps
Creating a pixmap using createPixmap:
Creating a pixmap using createPixmapFromBitmapData:
Copying pixmaps to and from windows
Getting pixmap geometry
Creating a bitmap from bitmap data
Creating stipples using bitmaps
Writing bitmaps to files
Reading bitmaps from files
Displaying bitmaps
Common Graphics image support
Expanded Specifying colors
Specifying colors as RGB intensities
Specifying colors by name
Parsing a color-specification string
Expanded Using palettes
The default palette
Creating indexed palettes
From pixel values to colors and back
Selecting and drawing with palettes
Direct palettes
Expanded Device-independent images
Creating and manipulating images
Displaying images
Direct color images
Copying images from a drawable
Expanded Icons
Creating icons
Drawing icons
Loading icons from DLLs
Using operating system icons
Expanded Image and icon file formats
Loading images from files
Handling errors
Loading icons from files
Unloading images into files
Unloading icons into files
Unloading images and icons into ByteArrays
Loading images and icons from ByteArrays
Determining the format of a file
Extra file format information
Resource management summary
Expanded Common Widgets
OSF/Motif compatibility
Common Widgets class hierarchy
Expanded Overview of Common Widgets user interface concepts
The parent-child widget tree
The widget lifecycle
Mapping and unmapping widgets
Managing and unmanaging widgets
Widget resources and functions
CwConstants pool dictionary
Example code to create a widget tree
Widget event handling and callbacks
Example of using an event handler and a callback
Expanded Creating and using widgets
Widget creation convenience methods
Callbacks
Event handlers
Shell widgets
Top-level shell widgets
Scrolled-window widgets
Expanded Main-window widgets
Main windows and geometry management
Text widgets
Expanded Drawing area widgets
Adding an event handler to a drawing area
Expanded Layout widgets
Form widgets
Row-column widgets
Expanded Button and label widgets
Static label widgets
Push-button widgets
Toggle-button widgets
Radio-button groups
Check boxes
Icon and pixmap label and button widgets
Application-drawn buttons
Expanded Menus
Greying out buttons
Simple menus and menu bars
Creating a menu bar and pull-down menu using simple menu protocol
Creating a secondary menu using simple menu protocol
Creating a pop-up menu using simple menu protocol
Non-simple menus and menu bars
Non-simple menu example
Expanded List widgets
Single selection lists
Multiple selection lists
Scrolled lists
Combo-box widgets
Expanded Composite-box widgets
MessageBox widgets
SelectionBox widgets
Dialog convenience methods
Expanded Creating and using prompters
Message prompter
Text prompter
File selection prompter
Expanded Extended widgets
Writing an extended widget
Example: a primitive extended widget
Example: a composite extended widget
Expanded Fonts
Using the system browser font
Colors
Expanded Clipboard operations
Examples for using the clipboard
Expanded Platform-integrated drag and drop
Target types
Transferring data
Drag and drop objects
Procs
Common Widgets drag and drop classes
Drag source widgets and the CwDragContext object
Drop site widgets and CwDropSite objects
Data transfer and the CwDropTransfer object
Expanded The user interface process model
The system view
The application programmer's view
Examples of applications with long-running operations
Expanded Extended Widgets
Extended Widgets class hierarchy
EwConstants pool dictionary
Creation convenience methods
Extended list widgets
Common resources
Scrolled lists
Drawn list widget
Expanded Icon list widgets
Renderables
Direct editing of labels
Flowed icon list widget
Icon area widget
Expanded Table list widget
Table list resources
Table columns
Direct editing of cell values
Edit policies
Expanded Tree widgets
Icon trees
Table trees
Expanded Notebook widgets
Creating pages
Callbacks
PM notebook widget
WIN notebook widget
Progress bar widget
Slider widget
Spin button widget
Split window widget
Expanded Tool bar widget
Creating tools
Using tools
Expanded Drag and Drop
Drag and drop adapters
Expanded Sequence of events
Voting and cursors
Source vote and image changes
Leaving a target
Dropping
Canceling a drag
System configuration
Simple drag and drop
Widget limitations
Expanded Common Printing
Common Printing classes
Expanded Printing process overview
Selecting a printer
Configuring print job attributes
Creating a print job
Expanded Using the printer prompter
Print job attributes
Expanded Using a printer shell
Creating a shell
Adding callbacks
Starting a job
Producing a page
Ending a job
CwPrinterShell resources and convenience methods
Printing with Common Graphics
A complete example
Expanded Setting up printers and queues on UNIX platforms
Configuring printer setup options
Printer configuration information
Expanded IBM Smalltalk Virtual Machine API
Expanded Who should read this chapter
Conventions
Expanded IBM Smalltalk C programming model
Defined types
Object types
Macros versus functions
Expanded External language interface
Parameter types
Calling a PlatformFunction
Inline external function calls
PlatformFunction protocols
PlatformLibrary protocols
Expanded Entry points
Parameter types and return types
Calling an EsEntryPoint
EsEntryPoint protocols
Expanded Asynchronous callouts
Calling a Platform Function asynchronously
Locking resources for an asynchronous call
ACO errors and error cases
Walkbacks
ACO errors
Parameter types and return types
Managing resources
Extensions to platform function protocols
ACO resource manager protocols
Resource future protocols
Static future protocols
ACO error protocols
Expanded OSObjects
OSObject subclasses
OSObject protocols
OSImmediate protocols
OSBaseType, OSObjectPointer, and OSStructure protocols
OSStructure protocols
OSVariableStructure protocols
OSBaseType protocols
ObjectPointer protocols
Methods available in other classes
Expanded User primitives
User primitive tables
Functions available in user primitives
Asynchronous messages (interrupts)
Using user primitive functions outside user primitives
Sample user primitives for IBM Smalltalk
Expanded Sample callback for OS/2 and Microsoft Windows
Example callback code
Smalltalk code that uses the primitive above
Expanded Platform requirements
OS/2
Microsoft Windows
Pascal16 and cdecl16 PlatformFunctions
Pascal16 and cdecl16 pointer conversion
UNIX platforms
Solaris platforms
Primitive error codes
Expanded Socket Communications Interface
Introduction
Expanded Application Programming Interface
Supported Socket and Database functions
SCI classes
Expanded SciAbstractSocket protocols
Instance methods
Expanded SciSocket protocols
Instance methods
Class methods: creation
Expanded SciLocalSocket protocols
Instance methods
Class methods: creation
Expanded SciSocketManager protocols
Instance methods
Class methods: creation
Expanded SciSocketAddress protocols
Instance methods
Class methods: creation
Expanded SciLocalSocketAddressProtocols
Instance Methods
Class methods: creation
Expanded SciReturn protocols
Instance methods
Expanded SciError protocols
Instance methods
Expanded SciErrorProxy protocols
Instance methods
Expanded SciHostEnt protocols
Instance methods
Expanded SciProtoEnt protocols
Instance methods
Expanded SciServEnt protocols
Instance methods
Error values
Expanded Secure Socket Layer (SSL)
Overview
SSL Example Workspaces Certificate and Private Key
Expanded Example Workspaces
SSL Server Workspace
SSL Client Workspace
Expanded Application Programming Interface
Supported SciSslSocket functions
Expanded SciSslSocket Protocols
Instance Methods
Expanded SciSslContext Protocols
Instance methods:
Class methods: creation
Expanded SciSslSocketConfiguration Protocols
Instance Methods
Expanded SciSslX509Certificate protocols
Instance methods
Class methods: creation
SciSslRSAPrivateKey protocols
Class methods: creation
Expanded SciSslError protocols
Instance methods
SciSslBlockingDispatcher protocols
The SciSslOpenSSLInterface Subapplication
Licenses
Expanded Dynamic data exchange
Introduction
DDE concepts and definitions
Expanded DDE classes
DdeClient class
DdeServer class
DdeServerManager class
DdeCallbackData class
Expanded Building a DDE server
Building a DDE server that uses default processing
Building a DDE server that does not use default processing
Discussion of the DdeServerManager
Expanded Building a DDE client
An example DDE client
Discussion of the DdeClient
Formats of data transferred between DDE servers and clients
Expanded Callbacks for handling DDE events
Return values
Expanded DDE protocols
DdeServerManager public class methods
DdeServerManager public instance methods
DdeClass public instance methods
DdeServer public instance methods
DdeClient public instance methods
Protocols common to DdeServer and DdeClient
Converting Smalltalk objects to a ByteArray and back
Expanded Test cases
Spreadsheet
Spreadsheet window coordinates
Two windows exchanging data
Updating time and date
Updating time in the String format
Platform-specific support
Expanded National Language Support
Expanded Overview of IBM Smalltalk National Language Support
NLS concepts and definitions
The POSIX locale model
Overview of internationalization
Overview of localized messages
Overview of message catalogs
Locating message catalogs
National Language Support classes
Support for double-byte characters
Obtaining Locale, LCCType, and LCCollate objects
Obtaining LCMessages, LCMonetary, LCNumeric, and LCTime objects
NLS-enabled classes
Locale-specific sorting
Number formatting
Locale change notification and the image startup sequence
Expanded Tools for developing international software
Loading externalization tools
Using message templates
Referencing and initializing localized messages
Overview of the message localization process
Using message catalogs
Using external message dictionaries
Using indexed external messages
Deleting locales from a message catalog file
Support for extended locales
Compatibilities
Compression
Limitations
Error detection and description
Support for platform resource formats
Localization support API
IBM Smalltalk locale names
Expanded Manual localization
LCCollate
LCMessages
LCMonetary
LCNumeric
LCTime
Locale
Expanded Locales and platform representation
OS/2 Presentation Manager
Microsoft Windows
AIX, HP-UX, and Solaris
Expanded Inter-process communication
Expanded UNIX environment
Method specification
Usage example
Expanded UNIX process
Method specification
Usage example
Expanded UNIX pipe stream
UNIX read pipe stream method specification
UNIX write pipe stream method specification
Expanded Object Linking and Embedding (OLE)
OLE concepts and definitions
Expanded OLE classes
OleMainWindow
OlePrimitive
OleClient
OleControl
OleAutomationObject
OleFile
Expanded Building an OLE document container
Creating an OLE main window
Creating OLE clients
Enabling clipboard operations
Creating an object verb menu
Invoking the Links dialog
Saving and retrieving an OLE client
Expanded Using OLE automation
Creating OLE Automation Objects
Invoking methods of OLE automation objects
Getting and setting properties
Releasing an OLE automation object
Expanded Using OLE custom controls (OCXs)
Creating the OLE main window
Creating OCXs
Implementing an ambient-property handler
Using automation aspects of an OCX
Implementing event handlers
Wrapping OCXs with extended widgets
Using licensed OCXs
Appendix A. Widget resources and callbacks
Appendix B. Extended widgets resources and callbacks
Appendix C. Drag and drop resources and callbacks
Appendix D. Common graphics platform differences
Appendix E. Common widgets platform differences
Index