[squeak-dev] The Inbox: Tools-cmm.927.mcz
Marcel Taeumel
marcel.taeumel at hpi.de
Thu Dec 19 12:50:39 UTC 2019
Hmm... #isInitialized feels like an anti pattern that violates the basic "information hiding" principle... Could we rename it to make the special tool use more clear? Maybe #canBeUsedInInspector ?
Best,
Marcel
Am 18.12.2019 10:06:54 schrieb Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
Hi Marcel,
Chris was wanting to step into "constructor" Dictionary new: 4
Le mer. 18 déc. 2019 à 10:02, Marcel Taeumel <marcel.taeumel at hpi.de [mailto:marcel.taeumel at hpi.de]> a écrit :
Hi Chris,
I don't think that #isInitialized is necessary. Under which circumstances is a Dictionary or Set not initialized?
Best,
Marcel
Am 17.12.2019 23:15:49 schrieb Chris Muller <asqueaker at gmail.com [mailto:asqueaker at gmail.com]>:
This one removes the send to #asArray, it wasn't necessary.
On Tue, Dec 17, 2019 at 4:14 PM <commits at source.squeak.org [mailto:commits at source.squeak.org]> wrote:
Chris Muller uploaded a new version of Tools to project The Inbox:
http://source.squeak.org/inbox/Tools-cmm.927.mcz [http://source.squeak.org/inbox/Tools-cmm.927.mcz]
==================== Summary ====================
Name: Tools-cmm.927
Author: cmm
Time: 17 December 2019, 4:14:11.72576 pm
UUID: 02595c45-7a56-4481-9038-3bca791d316e
Ancestors: Tools-mt.925
- Fix debugging of the initialization of Dictionary's.
- Fix the order of entries rendered by inspectors of OrderedDictionary's.
=============== Diff against Tools-mt.925 ===============
Item was changed:
----- Method: DictionaryInspector>>calculateKeyArray (in category 'selecting') -----
calculateKeyArray
"Recalculate the KeyArray from the object being inspected"
+ keyArray := object isInitialized
+ ifTrue: [ object keysInOrder ]
+ ifFalse: [ Array empty ].
+ selectionIndex := 0!
-
- keyArray := object keysSortedSafely asArray.
- selectionIndex := 0.
- !
Item was added:
+ ----- Method: HashedCollection>>isInitialized (in category '*Tools-Debugger') -----
+ isInitialized
+ ^ array notNil and: [ tally notNil ]!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191219/1a5f6698/attachment.html>
More information about the Squeak-dev
mailing list
|