[Pharo-dev] Old ClassBuilder remove!

Camillo Bruni camillobruni at gmail.com
Fri Nov 22 06:30:52 EST 2013


On 2013-11-22, at 11:56, Stephan Eggermont <stephan at stack.nl> wrote:

> Nice!
> 
> kilon wrote:
>> any links why newcomers like me should be impressed ? Whats the advantages ? 
> 
> Then we can now have more compact versions of 
> 
> FreeTypeSettings LabelMorph MorphTreeNodeMorph MorphTreeListManager ThemeSettings MultistateButtonMorph PharoUserPermissions SimpleHierarchicalListMorph Nautilus class SpecTreeColumn PluggableIconListMorph MorphTreeMorph Workspace CompositionScanner Paragraph MethodOveridesAction HandMorph TextComposer ScrollBar NECContext MultiByteFileStream NewValueHolder DynamicClassGroup SearchMorph NautilusHistoryEntry PluggableTextFieldMorph PluggableListMorph TableLayoutProperties DynamicGroup DropListMorph GradientFillStyle PackageTreeNautilus PluggableTextMorphWithLimits NECUntypedModel BalloonEngine MetacelloPharo30Platform SystemWindow NautilusWindow NECPreferences class EditorFindReplaceDialogWindow GoBackStringMorph NautilusHistoryEntryWithSourceCode MCCacheRepository PluggableButtonMorph AlphaImageMorph PluggableTextMorph RxMatcher MorphExtension TextMorphForFieldView MorphTreeColumn FindReplaceService CheckboxMorph TextMorphForEditView IndentingListItemMorph ControlButtonMorph CheckboxButtonMorph
> 
> with multiple booleans mapped to one instVar
> 
> 
> |set|
> set := IdentitySet new.
> Object allSubclasses do: [ :aClass |
> 	|varSize coll nr candidate |
> 	candidate := false.
> 	varSize := aClass instSize.
> 	coll := aClass allInstances.
> 	nr := 10 min: coll size.
> 	(coll first: nr) do: [ :anInstance |
> 		|value nrBoolean| 
> 		nrBoolean := 0.
> 		1 to: varSize do: [ :varIndex |
> 			value := anInstance instVarAt: varIndex.
> 			value class = True ifTrue: [ nrBoolean := nrBoolean + 1  ].
> 			value class = False ifTrue: [ nrBoolean := nrBoolean + 1  ]].
> 		nrBoolean >1 ifTrue: [ candidate := true ]   ].
> 	candidate ifTrue: [ set add: aClass ]].
> set.

I love these scripts :P..
maybe you should make gists [1] out of them :)

[1] https://gist.github.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 447 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131122/bab9559b/attachment.asc>


More information about the Pharo-dev mailing list