stoop questions

4
Some Questions

Upload: the-world-of-smalltalk

Post on 27-Nov-2014

505 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Stoop questions

Some Questions

Page 2: Stoop questions

S.Ducasse 2

The true behing new...Box class>>new

| instance | instance := super new. instance initialize. ^ instance

Box new

Page 3: Stoop questions

S.Ducasse 3

bindings...aBox borderWidth: 5

borderWidth: width self border: width

Page 4: Stoop questions

S.Ducasse 4

Fun with super

A>>foo

^ self class == super class

foo() this.class().getName().equals(super.class().getName())