Navigation:  Tutorials > Beginners Guide to Smalltalk > Objects and Messages >

Messages that are not understood

Previous pageReturn to chapter overviewNext page

We mentioned before that an object will only respond to a certain set of messages depending on what class of object it is. For example, objects that are kinds of number will hopefully handle arithmetic messages successfully. We would not, however, really expect text string objects to behave in the same way. Let's deliberately send a dubious message to a string:

'Hi Andy' squared

 

Notice that this causes a walkback window to pop-up. Dolphin uses these windows to indicate when some sort of error has occurred. The window caption indicates the basic problem, in this case, String does not understand #squared. At this stage, you could choose to enter the system debugger (by pressing the Debug button) to further diagnose the problem. However, understanding the debugger is perhaps beyond us at this point so, for the time being, get used to clicking on Terminate when you see a walkback pop up.