smallTALK
The official newsletter of the Chicago Smalltalk Users' Group
Volume 1 Number 1 - March 1995

Officers

President: Richard Frankel (708) 582-2121
Treasurer: Chris Beal (708) 295-5000

Newsletter Editors

Curt Rostenbach, CCH Incorporated (312) 866-3447
Bob Barons, Strategic Technology Resources (312) 266-0777
Ben Grinvalds, Teleconferencing Technologies Inc. (815) 338-2300

Contacts

Mike King, Chicago Solutions Group (708) 582-2121

Submissions to smallTALK newsletter

Articles for publication in this newsletter should be sent to:

Curt Rostenbach

CCH Incorporated

4025 W. Peterson, Chicago, IL 60646

Phone: (312) 866-3447 10a-6p.

Preferred format is Microsoft Word for Windows, however ASCII text is fine. Internet address is 'rostenbc@cch.com' and through special arrangements, articles can be modemed or faxed for OCR interpretation, which is how paper submissions will be processed.

Any subject is acceptable (within editorial discretion), so feel free to put fingers to keyboard and pound out an article.


Class new

Chris Lopeman, CCH Incorporated

Welcome to Class new. In an effort to promote the exchange of information this column will appear regularly in this news letter. Class new will contain small, hopefully useful, new class definitions and new methods for existing classes. Where are these classes coming from? You, the readers of this news letter. Bring me your goodies! Try to pick the ones that are vendor independent. That's where it get a little tricky. Your author is a ParcPlace bigot (not really, I just don't know anything else). But the problem remains, my toy box contains only ParcPlace toys. I'm going to try to pick not only those that are useful, but also those that I believe will run on other systems with little to no modification. I would like you to try to do the same. Send me your goodies from any system. I'll try to get them to work in VisualWorks and probably print them whether I'm successful or not. How do you get your goodies to me? Hand them to me on floppy (IBM) or on paper at any users group meeting. Or E-Mail them to me at lopemanc@CCH.com . Whatever you send make sure it is free and clear of copyrights.

OK, let's take a look at our first class. Its called Range and it's so simple and useful (to me anyway) that I could not believe that it isn't in the base VisualWorks system. There are RangeAdapters and Intervals but neither fit the way I wanted to work with a range. I developed the Range class to validate the number of expected results from certain data base queries. So a Range can be something like 1 -> 5 or 10 -> Infinity +. However, it can also be used on just about and sequenceable object such as Dates and Strings.

This class is fairly well commented and populated with test harnesses, so I believe no further explanation is necessary. Just pull it in and play with it.

You can request copies via Internet E-mail (lopemanc@CCH.com).

Association subclass: #Range

instanceVariableNames: ''

classVariableNames: ''

poolDictionaries: ''

category: 'Generic Goodies'!

Range comment:

'A Range is a pair of objects-a key (start) and a value(end). Basically it provides

functionality for performing easy between type check. It works for both Magnitudes

(Dates , Numbers) and Collections(strings). Actually converting a string or number

to a Range is easy and is shown in the creation methods of this class

'!

!Range methodsFor: 'comparing'!

contains: anObject

"test to see if the object falls in betweeen the 2 values of the range"

"(3 through: 15) contains: 4"

"(3 through: 15) contains: 44"

" ( 'bear' through: 'rhino' ) contains: 'cat' "

"(3 through: 15) contains: (4 through: 10)"

anObject class == Range

ifTrue:

[

^(( self start <= anObject start) & (self end >= anObject end))

]

ifFalse:

[

^((self key <= anObject) & (self value >= anObject)).

]!

doesntContain: anObject

"test to see if the object falls in betweeen the 2 values of the range"

"(3 through: 15) doesntContain: 4"

"(3 through: 15) doesntContain: 44"

^(self contains: anObject) not.!

doesntIntersect: anObject

"test to see if the object falls in betweeen the 2 values of the range"

||

"(3 through: 15) doesntIntersect: 4"

"(3 through: 15) doesntIntersect: (2 through: 1)"

^ (self intersects: anObject) not!

intersects: anObject

"test to see if the object falls in betweeen the 2 values of the range"

|range2|

"(3 through: 15) intersects: 4"

"(3 through: 15) intersects: 44"

" ( 'bear' through: 'rhino' ) intersects: 'cat' "

"(3 through: 15) intersects: (2 through: 1)"

anObject class == Range

ifTrue:

[

range2 := anObject

]

ifFalse:

[

range2 := anObject through: anObject

].

^ ( ( range2 contains: self) |

(self contains: range2 start) |

(self contains: range2 end)

)! !

!Range methodsFor: 'accessing'!

end

^ self value!

start

^ self key! !

"- - - - - - - - - - - - - - - - - - "!

Range class

instanceVariableNames: ''!

!Range class methodsFor: 'instance creation'!

from: aMagnitude1 through: aMagnitude2

"Return a range "

"Range from: 1 through: 5"

"1 through: 5"

" (Date readFrom: '4/11/94' readStream) through: (Date readFrom: '4/1/91' readStream)"

" 'test' through: 'tex' "

"lesser value first"

aMagnitude1 > aMagnitude2

ifTrue:

[

^super key: aMagnitude2 value: aMagnitude1.

]

ifFalse:

[

^super key: aMagnitude1 value: aMagnitude2.

]!

readFrom: aStream

"read an association from the stream and convert t a range"

"Range readFrom: '5->6' readStream "

| tempAssoc |

tempAssoc := Association readFrom: aStream.

^Range from: tempAssoc key through: tempAssoc value.! !

!Magnitude methodsFor: 'converting'!

through: aMagnitude

"create a range from the reciver to the argument"

^Range from: self through: aMagnitude! !

!SequenceableCollection methodsFor: 'converting'!

through: aSequencableCollection

"create a range from the reciver to the argument"

^Range from: self through: aSequencableCollection! !


New TV Season

Curt Rostenbach, CCH Incorporated

The new TV season is upon us. This season, as in previous seasons, the shows will attempt to take
previous hits and recycle them by incorporating the latest fad. This season, the techie yuppies are out in force. The following are the new programs we will be seeing when we are not using the family TV as a color monitor.

PROGRAMS, HE WROTE

Rumor has it that this one was initially to be a sitcom about a television writer, but the idea scrapped and the name retained to be used in this murder/mystery series. The main character of this series collects information on all the weekly guest stars to be entered into a database and then writes a filter program to arrive at the prime suspect. Expect this one to be replaced real early in the season.

KOOKLA, FRAN, AND OOPSLA

Given the hype that O-O programming is so simple a child can learn it, the networks are floating this program in an attempt to deflect the attacks by parents organizations that shows for kids are merely long commercials for products. How could they have known?

NIGHT WRITER

Finally a series that this reviewer can relate to. The show is about the problems of a computer programmer who does all his work late at night. Using a home made computer built from a kit (and hence it's name), the programmer attempts to make a living writing programs while subsisting on Twinkees and Coke.

MIAMI DEVICE

A pair of DARPA engineers on loan to the DEA try to make semiconducting devices out of a strange white powder that is available in large quantities in the Miami area. Expect this one to take a nose dive.

OOPS, THERE IT IS!

The refrain from a popular rap song is the title of this sitcom that has an inner city family grappling with the re-education required to remain employed. Oops!

MACINTOSH, PC

Another indication of the broadcast networks inability to grasp the real meaning of microcomputers in American society by mixing these incompatible terms in the title of this series about a Silicon Valley detective. Somehow in keeping with the incongruity of the title, this detective will wear muscle T-shirts with a pocket full of pens (with pocket protector as well) and a taped up pair of glasses that get removed (a la Superman) whenever a fist fight is imminent. Titles like "The Case of the 16 Byte Data Buss" and "The Overwritten ROM" indicates that the scripts will be the standard detective fare with random accesses into a computer terminology dictionary for slang.

I, OBJECT!

With the exposure that computers in the O.J. Simpson trial received and the death of Raymond Burr, this courtroom drama tries to resurrect Perry Mason as an artificial intelligence program that outwits the DA and forces the guilty party to confess while on camera. I object!

There you have it folks, a collection of shows that sounded good in theory but fell on their face in execution.


Meeting Notes

September 15, 1994

Described below are some of the significant discussion items from the Chicago Smalltalk Users Group organizational meeting held on September 15,1994. The decisions of the group will serve as guidelines for those members who have volunteered their time to organize events on the members' behalf. The decisions were not meant to be cast in concrete, and as such may be revisited by the group at a future date.

Meeting will be held on a monthly basis. We will attempt to schedule the meetings on the first Thursday of each month - subject to the availability of presenters. Meetings will last approximately one and a half hours, and most often will be scheduled 'after work hours'.

The following companies volunteered their facilities for meeting locations: Hewitt Associates, JMB Realty, Metromail, CCH, and Motorola.

Annual membership dues were agreed as follows: $10.00 for an individual membership, and $40.00 for a corporate membership. Corporate membership did not have a limit on the number of individuals, however an additional fee is probably warranted above a certain amount. The primary purpose for the membership fee is to cover postage for meeting notifications and -newsletters.

Members made the following suggestions for the purpose of the group. As you can see, the members have varied interests!

The following topics were listed when members were asked for meeting topics.

The members agreed that the group should NOT be used as a sales or marketing forum. The purpose of the group is to provide a forum for the sharing of information between members.

Finally, the members decided that a membership list should be distributed to all members. Any member or company not wanting their name distributed can request that their name not be included.


Previous Page...