pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Calypso does not directly change when #isAbstract returns true

Open astares opened this issue 5 years ago • 3 comments

Calypso usually displays abstract classes in an italic font style - so one can directly see that they are abstract. Unfortunately in the implementation flow Calypso does not directly show this when implementing the abstract class

  • open Calpso
  • create a class "AbstractFoo"
  • implement a class side method
isAbstract
  self name = #AbstractFoo

and save the method.

=> Calypse does not directly update and show the class in italic font style to show that this class is an abstract class

Side note: If you add an instance variable to the class (or reload it after storing in git) then it gets updated in Calypso.

astares avatar Oct 31 '20 14:10 astares

This still seems to be a bug. Random classes in my code display in italics when they are not abstract. As noted previously, adding the isAbstract class method does not update the display.

Also, the "Side note" says that adding an inst var to a class or reloading the class fixes the problem but I do not see that. Adding an inst var or loading into a fresh image, for me, still shows classes italicized incorrectly.

Also, a request. Could an easy-to-find cheat sheet on what Pharo's browser symbols and hieroglyphics mean be made? It took a long time for me to figure out that italicized class names mean they are abstract. Thanks.

Using the (final?) stable release of Pharo 12.

Pharo 12.0.0 Build information: Pharo-12.0.0+SNAPSHOT.build.1571.sha.cf5fcd22e66957962c97dffc58b0393b7f368147 (64 Bit)

ericwinger avatar Jun 05 '25 18:06 ericwinger

This still seems to be a bug. Random classes in my code display in italics when they are not abstract. As noted previously, adding the isAbstract class method does not update the display.

Also, the "Side note" says that adding an inst var to a class or reloading the class fixes the problem but I do not see that. Adding an inst var or loading into a fresh image, for me, still shows classes italicized incorrectly.

Also, a request. Could an easy-to-find cheat sheet on what Pharo's browser symbols and hieroglyphics mean be made? It took a long time for me to figure out that italicized class names mean they are abstract. Thanks.

Using the (final?) stable release of Pharo 12.

Pharo 12.0.0 Build information: Pharo-12.0.0+SNAPSHOT.build.1571.sha.cf5fcd22e66957962c97dffc58b0393b7f368147 (64 Bit)

It will be displayed in italic in two cases:

  • You override #isAbstract and it returns true
  • It have methods calling #subclassReponsibility

So it is possible that your class does not implement an abstract method.

What Astares is refering to is not how to have a class in italic, but more when do the browser refresh to take into account a new #isAbstract method

jecisc avatar Jun 13 '25 15:06 jecisc

@jecisc Thank you, your subclassResponsibility hint was what I was missing. I see now that if a subclass inherits a method calling #subclassResponsibility, the subclass will be considered abstract, as well, and be italicized. That seems reasonable.

I also can affirm that the problem described by @astares still exists and, in addition, manifests when adding/removing/overriding #subclassResponsibility methods. I think the class italics should update at the time of method compile.

ericwinger avatar Jun 13 '25 17:06 ericwinger