Creating Class Objects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating Class Objects

Mohammad Al Houssami (Alumni)

Hello Eveyone,

I just filed out a package did some changes and then filed in again. Im getting the error doesNotUnderstand: #CharacterToken and the name of the window says  MessageNotUnderstood: receiver of " CharacterToken" is nil.

 

What I have in my code is this characterToken CharacterToken new.

characterToken is a variable I have. What is even more confusing is that I have the same thing for other things(endOfFileToken EndOfFileToken new.) but it doesn’t complain to these but only this one even though Im doing them in the same exact way. Any ideas what the problem can be ?

 

Thanks

Mohammad

Reply | Threaded
Open this post in threaded view
|

Re: Creating Class Objects

stephane ducasse
<base href="x-msg://3504/">
characterToken CharacterToken new.

you are sending the message CharacterToken to charactertoken which is nil so it does not work.

characterToken := CharacterToken new will work.
Now read the chapter on the syntax on Pharo by example. The book is free but you have to read it to learn.

Stef




On Apr 24, 2013, at 4:13 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:

Hello Eveyone,
I just filed out a package did some changes and then filed in again. Im getting the errordoesNotUnderstand: #CharacterToken and the name of the window says MessageNotUnderstood: receiver of " CharacterToken" is nil.
 
What I have in my code is this characterToken CharacterToken new.
characterToken is a variable I have. What is even more confusing is that I have the same thing for other things(endOfFileToken EndOfFileToken new.) but it doesn’t complain to these but only this one even though Im doing them in the same exact way. Any ideas what the problem can be ?
 
Thanks
Mohammad