Are comments allowed in class definitions?
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
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 <vfclists@gmail.com> 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
On 7 January 2013 12:15, Camillo Bruni <camillobruni@gmail.com> 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 <vfclists@gmail.com> 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
On 2013-01-07, at 13:45, Frank Church <vfclists@gmail.com> wrote:
On 7 January 2013 12:15, Camillo Bruni <camillobruni@gmail.com> 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 :)
On 7 January 2013 12:56, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-01-07, at 13:45, Frank Church <vfclists@gmail.com> wrote:
On 7 January 2013 12:15, Camillo Bruni <camillobruni@gmail.com> 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
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
participants (2)
-
Camillo Bruni -
Frank Church