[Pharo-users] From vwnc interesting..

2016-04-04 Thread S Krish
| x y | x := 2.0. [x > 0] whileTrue: [x := x / 2]. y := -2.0. [y < 0] whileTrue: [y := y / 2]. (x = 0.0) -> (x = y) -> ((x basicAt: 1) = (y basicAt: 1)) printIt returns true->true->false and: x = 0.0 and y = -0.0 the negative 0.0 https://en.wikipedia.org/wiki/Signed_zero

Re: [Pharo-users] Detecting a class is abstract

2016-04-04 Thread Henrik Nergaard
One could extend ClassWidget>>#buildTabbedNameOf: to include this functionality. Quick hack: ClassWidget>>#isAbstract: aClass ^(aClass whichSelectorsReferTo: #subclassResponsibility) isNotEmpty or: [ (aClass respondsTo: #isAbstract) and: [ aClass isAbstract ] ] Last part of #buildTabbedNameOf

Re: [Pharo-users] Detecting a class is abstract

2016-04-04 Thread Hilaire
Thanks Peter. So I guess, Nautilus does not offer this functionnality. Hilaire -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Detecting a class is abstract

2016-04-04 Thread Peter Uhnák
1. To tell whether a class is abstract: isAbstract := [ :aClass | (aClass whichSelectorsReferTo: #subclassResponsibility) isNotEmpty or: [ (aClass respondsTo: #isAbstract) and: [ aClass isAbstract ] ] ] Just be aware that some classes are "abstract", but you can actually instantiate them, because

[Pharo-users] Detecting a class is abstract

2016-04-04 Thread Hilaire
Hi, Can Nautilius indicate when a class is abstract (i.e. at least one method in the class, then its hierarchy is definted respond subclassResponsability?) I did not find it in the Analyze menu. Thanks Hilaire -- Dr. Geo http://drgeo.eu