a 'doesNotUnderstand' message that I do not understand...

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

a 'doesNotUnderstand' message that I do not understand...

Alain Busser
Hi all,

Exploring the system browser (Pharo 2.0), I see that there exists a class called TextEditorDialogWindow; as this name sounds interesting to me, I want to test one, and I see that there is only one method in the category 'create': this method is called newTextEditorMorph. So, I send the message newTextEditorMorph to the class TextEditorDialogWindow, daring a:

TextEditorDialogWindow newTextEditorMorph

At the 'Do It', I get this error message: 'TextEditorDialogWindow class(Object)    doesNotUnderstand: #newTextEditorMorph'

That's what I don't understand: If the class has a method called this way, why does it not understand the corresponding message? What did I miss?

Alain
Reply | Threaded
Open this post in threaded view
|

Re: a 'doesNotUnderstand' message that I do not understand...

Benjamin Van Ryseghem (Pharo)
You miss the difference between a class and its instances

Ben

On May 14, 2013, at 8:10 PM, Alain Busser <[hidden email]> wrote:

Hi all,

Exploring the system browser (Pharo 2.0), I see that there exists a class called TextEditorDialogWindow; as this name sounds interesting to me, I want to test one, and I see that there is only one method in the category 'create': this method is called newTextEditorMorph. So, I send the message newTextEditorMorph to the class TextEditorDialogWindow, daring a:

TextEditorDialogWindow newTextEditorMorph

At the 'Do It', I get this error message: 'TextEditorDialogWindow class(Object)    doesNotUnderstand: #newTextEditorMorph'

That's what I don't understand: If the class has a method called this way, why does it not understand the corresponding message? What did I miss?

Alain

Reply | Threaded
Open this post in threaded view
|

Re: a 'doesNotUnderstand' message that I do not understand...

xx397
In reply to this post by Alain Busser
This method is on the instance side of the class and therefore requires TextEditorDialogWindow new newTextEditorMorph. If it were on the class side, it would be like you were trying it.

Hi all,

Exploring the system browser (Pharo 2.0), I see that there exists a class called TextEditorDialogWindow; as this name sounds interesting to me, I want to test one, and I see that there is only one method in the category 'create': this method is called newTextEditorMorph. So, I send the message newTextEditorMorph to the class TextEditorDialogWindow, daring a:

TextEditorDialogWindow newTextEditorMorph

At the 'Do It', I get this error message: 'TextEditorDialogWindow class(Object)    doesNotUnderstand: #newTextEditorMorph'

That's what I don't understand: If the class has a method called this way, why does it not understand the corresponding message? What did I miss?

Alain

Reply | Threaded
Open this post in threaded view
|

Re: a 'doesNotUnderstand' message that I do not understand...

Alain Busser
So it was that simple! Thanks alot for these messages, now I will be able to make *new* and *classy* things instantly :-D

Alain


On Tue, May 14, 2013 at 10:21 PM, Chris <[hidden email]> wrote:
This method is on the instance side of the class and therefore requires TextEditorDialogWindow new newTextEditorMorph. If it were on the class side, it would be like you were trying it.

Hi all,

Exploring the system browser (Pharo 2.0), I see that there exists a class called TextEditorDialogWindow; as this name sounds interesting to me, I want to test one, and I see that there is only one method in the category 'create': this method is called newTextEditorMorph. So, I send the message newTextEditorMorph to the class TextEditorDialogWindow, daring a:

TextEditorDialogWindow newTextEditorMorph

At the 'Do It', I get this error message: 'TextEditorDialogWindow class(Object)    doesNotUnderstand: #newTextEditorMorph'

That's what I don't understand: If the class has a method called this way, why does it not understand the corresponding message? What did I miss?

Alain


Reply | Threaded
Open this post in threaded view
|

Re: a 'doesNotUnderstand' message that I do not understand...

Mariano Martinez Peck
In reply to this post by Alain Busser
If you does not understand a #doesNotUnderstand: it seem you are going META to me hehehe.


On Tue, May 14, 2013 at 3:10 PM, Alain Busser <[hidden email]> wrote:
Hi all,

Exploring the system browser (Pharo 2.0), I see that there exists a class called TextEditorDialogWindow; as this name sounds interesting to me, I want to test one, and I see that there is only one method in the category 'create': this method is called newTextEditorMorph. So, I send the message newTextEditorMorph to the class TextEditorDialogWindow, daring a:

TextEditorDialogWindow newTextEditorMorph

At the 'Do It', I get this error message: 'TextEditorDialogWindow class(Object)    doesNotUnderstand: #newTextEditorMorph'

That's what I don't understand: If the class has a method called this way, why does it not understand the corresponding message? What did I miss?

Alain



--
Mariano
http://marianopeck.wordpress.com