|
CS 535 Object-Oriented Programming & Design
Fall Semester, 2001
Odds & Ends
|
|
|
Previous   
Lecture Notes Index
   Next    
© 2001, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 11-Dec-01
|
|
Contents of Doc 24, Odds & Ends
Reference
VisualWorks
Application Developer's Guide
Dialogs
We
have a Customer class with
- Instance
variables name, phone, id
- A
window spec called getCustomer
The
window spec has
- Input
fields for each instance variable
- OK
and Cancel buttons
The
"OK" button has action "accept"
The
"Cancel" button has action "cancel'
Do
not implement the accept and cancel methods in Customer
Add
the following class method to Customer:
Customer class>>getFromUser
| customer accept |
customer := Customer new.
accept := customer openDialogInterface: #getCustomer.
^accept
ifTrue:[^customer]
ifFalse:[^nil]
Now
Customer getFromUser will return
- Nil
if user cancels the operation
- The
customer object with user input if user accepts
Recovering
Changes
At
some point you will lose some work due to:
- Corrupt
image
- Power
outage
- Exiting
without saving
- Etc.
You
can recover your work as changes are stored as you make them in the ".cha" file
If
your image is still workable open the change list tool
- Select
the "Open Change List" item of the "Changes" menu in the launcher
In
the Change List Tool open the last changes
- Select
the "Recover Last Changes" item in the "File" menu of the change list tool
The
change list tool will show all changes since the last time you saved your image
These
changes can be replayed
See
"Using the Change List" starting on page 150 of the VisualWorks Application
Developer's Guide for more information
Corrupt
Images
Occasionally
you will do something to corrupt an image
This
could happen when you:
- Make
a bad change to a system class
- Put
a self halt in code that is called every time a window opens
- Run
out of memory on a Mac
- Mess
up widow code so closing a window only partly removes the window code
When
this happens it is useful to have backup of your work
- File
outs
- Change
Sets
- Parcels
If
you do not have back up don't panic.
Make
a backup copy of your .cha file
Go
read the manual on the Change List Tool
Managing
Code
- VisualWorks
standard for distributing code
- Much
more useful than file outs
- Useful
in keeping different lists of changes in an image
- In
browser allows you to add/retrieve Smalltalk code from a database
- A
source control system for VisualWorks
See
chapters 7 & 8 of the VisualWorks Application Developer's Guide for more
information
Applications
Creating
an application requires
- Preparing
an image with Runtime Packager
The
first time you run the Runtime packager use the default values
See
chapter 13 Application Delivery of VisualWorks Application Developer's Guide
for more information for more information
What
to Turn in for the Project
- Hard
copy of the source code for the Project
- Electronic
copy of the source code on a floppy
- A
brief description of your classes (1-3 pages, maximum of 5 pages)
- A
description of how to load your project into an image
- Files
to read
- Namespaces
you use
- How
to start the application
- This
is part of your 5 page limit
Due
6:30 pm Wednesday December 19
Copyright ©, All rights reserved.
2000 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.
Previous   
visitors since 11-Dec-01
   Next