4Smalltalk101 - cs2340:Smalltalk101 Fall 2008 Smalltalk101 1

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Smalltalk 101 1 cs2340: Smalltalk 101 Fall 2008
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Smalltalk 101 2 Advanced Topics in Smalltalk Loading/Unloading Code Basic SUnit Inheritance / Exception Handling File IO Threading Networking
Background image of page 2
Smalltalk 101 3 Code Import Bundles - Packages FileIn / FileOut Parcels (binary deployment) Store Changesets Tools->Change List See App Developers Guide, Managing Smalltalk Source        Tool Guide, Change Sets
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Smalltalk 101 4 SUnit Basic test framework Use TestRunner, or Browser extension Bar green – test passed Bar red – Failure (a test failed with an unexpected value Error (missing classes, syntax problems, non-execution)
Background image of page 4
Smalltalk 101 5 Inheritance shouldNotImplement (refuse to implement an inherited method) subclassResponsibility (force subclasses to implement this method) These are not reserve words, they are messages to instances of class Object
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Smalltalk 101 6 Creating Our own instances Initialization initialize method super new initialize Initialization with data name:gender: Create instance and set values. Return the instance (important!!) Be careful about multiple calls to initialize
Background image of page 6
Smalltalk 101 7 Exceptions error: ‘a string’. Old exception handling mechanism common to all objects (like try/catch) handle: do: sent to instance of Signal ArithmeticValue divisionByZeroSignal handle: [ :ex | Transcript cr; show: ex errorString] do: [ 4 // 0] Throwing: DivisionSignal raise.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Smalltalk 101 8 New ANSI Exception Handling Replaces Signal with Exception class hierarchy send the on: do: message to a block | x y | x := 7. y := 0.
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/19/2009 for the course CS 2340 taught by Professor Staff during the Fall '08 term at Georgia Institute of Technology.

Page1 / 32

4Smalltalk101 - cs2340:Smalltalk101 Fall 2008 Smalltalk101 1

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online