user4813927
user4813927

Reputation:

GNU Smalltalk Object doesn't understand init

I have just started learning GNU Smalltalk from this page. My question is if this page is outdated? In the class creation example it has the r := super new. ^r init massage, however running Object new init i get

Object: Object new "<0x7f930e71d800>" error: did not understand #init

I am running the gst version 3.2.91.

Upvotes: 2

Views: 408

Answers (1)

Leandro Caniglia
Leandro Caniglia

Reputation: 14843

The documentation explicitly says:

So what we need to do is ask the object to set itself up. By saying r init, we are sending the init message to our new Account. We’ll define this method in the next section—for now just assume that sending the init message will get our Account set up.

In other words, you have to keep reading to learn how to define init.

Upvotes: 3

Related Questions