Are comments allowed in class definitions?

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

Are comments allowed in class definitions?

Frank Church

Whenever I create a class, add a comment and 'accept it' the comment is removed from the definition.
With methods it is fine.

I am using the Pharo 1.4 Summer Edition.

Is that standard behaviour?
--
Frank Church

=======================
http://devblog.brahmancreations.com
Reply | Threaded
Open this post in threaded view
|

Re: Are comments allowed in class definitions?

Camillo Bruni-3
yes this is the "confusing" default behavior.

There is a "Comment" button in the browser which let's you add a persistent class comment.


On 2013-01-07, at 12:57, Frank Church <[hidden email]> wrote:

> Whenever I create a class, add a comment and 'accept it' the comment is
> removed from the definition.
> With methods it is fine.
>
> I am using the Pharo 1.4 Summer Edition.
>
> Is that standard behaviour?
> --
> Frank Church
>
> =======================
> http://devblog.brahmancreations.com


Reply | Threaded
Open this post in threaded view
|

Re: Are comments allowed in class definitions?

Frank Church


On 7 January 2013 12:15, Camillo Bruni <[hidden email]> wrote:
yes this is the "confusing" default behavior.

There is a "Comment" button in the browser which let's you add a persistent class comment.



That's interesting is there some reason for that?
 
On 2013-01-07, at 12:57, Frank Church <[hidden email]> wrote:

> Whenever I create a class, add a comment and 'accept it' the comment is
> removed from the definition.
> With methods it is fine.
>
> I am using the Pharo 1.4 Summer Edition.
>
> Is that standard behaviour?
> --
> Frank Church
>
> =======================
> http://devblog.brahmancreations.com





--
Frank Church

=======================
http://devblog.brahmancreations.com
Reply | Threaded
Open this post in threaded view
|

Re: Are comments allowed in class definitions?

Camillo Bruni-3

On 2013-01-07, at 13:45, Frank Church <[hidden email]> wrote:

> On 7 January 2013 12:15, Camillo Bruni <[hidden email]> wrote:
>
>> yes this is the "confusing" default behavior.
>>
>> There is a "Comment" button in the browser which let's you add a
>> persistent class comment.
> That's interesting is there some reason for that?

well the class comment could be shown in the very same place where you
define the class but usually they are too long, hence they are in a
separate panel.

Furthermore, the class definition itself is not a real method. It actually
recreates the definition from the class itself. You can evaluate,

        Class definition

to get the string back :).

hope that answered your question :)

Reply | Threaded
Open this post in threaded view
|

Re: Are comments allowed in class definitions?

Frank Church


On 7 January 2013 12:56, Camillo Bruni <[hidden email]> wrote:

On 2013-01-07, at 13:45, Frank Church <[hidden email]> wrote:

> On 7 January 2013 12:15, Camillo Bruni <[hidden email]> wrote:
>
>> yes this is the "confusing" default behavior.
>>
>> There is a "Comment" button in the browser which let's you add a
>> persistent class comment.
> That's interesting is there some reason for that?

well the class comment could be shown in the very same place where you
define the class but usually they are too long, hence they are in a
separate panel.

Furthermore, the class definition itself is not a real method. It actually
recreates the definition from the class itself. You can evaluate,

        Class definition

to get the string back :).

hope that answered your question :)


I don't see any "Comment" button by I suspect that is the '?' button that is for the comment. Can any arbitrary text go there?

--
Frank Church

=======================
http://devblog.brahmancreations.com
Reply | Threaded
Open this post in threaded view
|

Re: Are comments allowed in class definitions?

Camillo Bruni-3
> I don't see any "Comment" button by I suspect that is the '?' button that
> is for the comment.

sorry, I use Pharo 2.0 where it's called "Comment" ;)

> Can any arbitrary text go there?

yes, you can check other classes that already have comments, like Dictionary.
You can always directly access the comment with:

        Dictionary comment