I'm REALLY new to Smalltalk. In a previous thread, I created a file
Hello.st:
Object subclass: #Hello
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: ''!
"Create a method"
!Hello methodsFor: 'speaking'!
publish
Transcript show: 'Greetings. '!
! !
To load it, I do
FileStream fileIn: 'Hello.st' !
BUT, if I want to "run" Hello, I have to do
Hello new publish
My question is: why did I have to `new` Hello, whereas I don't have to
`new` FileStream? Presumably for Hello I have to create an object by
instantiating a class, whereas with a class like FileStream I don't
have to. What's going on? Are there methods which only belong to
classes and not objects, and if so, how do I define them?
Sorry if the question seems really dumb.
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk