The Trunk: Tools-mt.1018.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-mt.1018.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1018.mcz

==================== Summary ====================

Name: Tools-mt.1018
Author: mt
Time: 9 December 2020, 4:22:42.675366 pm
UUID: 97109dc8-cea7-45fd-ace9-833fcbec96a4
Ancestors: Tools-eem.1017

Adds a simple (but working) inspector for CharacterSet.

=============== Diff against Tools-eem.1017 ===============

Item was added:
+ ----- Method: CharacterSet>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+
+ ^ CharacterSetInspector!

Item was added:
+ CollectionInspector subclass: #CharacterSetInspector
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tools-Inspector'!

Item was added:
+ ----- Method: CharacterSetInspector>>canAddOrRemoveElements (in category 'private') -----
+ canAddOrRemoveElements
+
+ ^ false!

Item was added:
+ ----- Method: CharacterSetInspector>>elementGetterAt: (in category 'private') -----
+ elementGetterAt: element
+
+ ^ [:set | element]!

Item was added:
+ ----- Method: CharacterSetInspector>>elementIndices (in category 'private') -----
+ elementIndices
+
+ ^ self object canBeEnumerated
+ ifTrue: [self object asArray]
+ ifFalse: [#()]!

Item was added:
+ ----- Method: CharacterSetInspector>>elementSetterAt: (in category 'private') -----
+ elementSetterAt: index
+
+ ^ [:set :element | self error: 'Character sets cannot be changed.']!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.1018.mcz

marcel.taeumel
Hmm... we could show the character code in either the field list or the value pane .. what do you prefer?


Am 09.12.2020 16:22:54 schrieb [hidden email] <[hidden email]>:

Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1018.mcz

==================== Summary ====================

Name: Tools-mt.1018
Author: mt
Time: 9 December 2020, 4:22:42.675366 pm
UUID: 97109dc8-cea7-45fd-ace9-833fcbec96a4
Ancestors: Tools-eem.1017

Adds a simple (but working) inspector for CharacterSet.

=============== Diff against Tools-eem.1017 ===============

Item was added:
+ ----- Method: CharacterSet>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+
+ ^ CharacterSetInspector!

Item was added:
+ CollectionInspector subclass: #CharacterSetInspector
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tools-Inspector'!

Item was added:
+ ----- Method: CharacterSetInspector>>canAddOrRemoveElements (in category 'private') -----
+ canAddOrRemoveElements
+
+ ^ false!

Item was added:
+ ----- Method: CharacterSetInspector>>elementGetterAt: (in category 'private') -----
+ elementGetterAt: element
+
+ ^ [:set | element]!

Item was added:
+ ----- Method: CharacterSetInspector>>elementIndices (in category 'private') -----
+ elementIndices
+
+ ^ self object canBeEnumerated
+ ifTrue: [self object asArray]
+ ifFalse: [#()]!

Item was added:
+ ----- Method: CharacterSetInspector>>elementSetterAt: (in category 'private') -----
+ elementSetterAt: index
+
+ ^ [:set :element | self error: 'Character sets cannot be changed.']!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.1018.mcz

Craig Latta

 > Hmm... we could show the character code in either the field list or
 > the value pane .. what do you prefer?

      The value pane... but if the character has a meaningful visual
rendering, I'd appreciate it seeing it in parentheses after its index in
the field list.


-C

--
Craig Latta :: research computer scientist
Black Page Digital :: Berkeley, California
663137D7940BF5C0AFC  1349FB2ADA32C4D5314CE



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.1018.mcz

marcel.taeumel
> [...] after its index in the field list.

Would it make sense to show that (fabricated) index at all? It is a set ... Or do you mean the character code, which you wanted to see in the value pane.. Hmm...

Here are the representations we have for elements in a character set:

- an index (fabricated via #do:)
- Character >> #printOn:
- Character >> #printAsLiteralOn: (used in #printOn: for meaningful visual rendering)
- Character >> #asInteger (aka. character code)

So? :-D

Best,
Marcel

Am 09.12.2020 20:39:57 schrieb Craig Latta <[hidden email]>:


> Hmm... we could show the character code in either the field list or
> the value pane .. what do you prefer?

The value pane... but if the character has a meaningful visual
rendering, I'd appreciate it seeing it in parentheses after its index in
the field list.


-C

--
Craig Latta :: research computer scientist
Black Page Digital :: Berkeley, California
663137D7940BF5C0AFC 1349FB2ADA32C4D5314CE





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.1018.mcz

Craig Latta

 > Would it make sense to show that (fabricated) index at all? It is a
 > set...

      Right, I guess I'm just used to that. I suppose it could mislead a
newcomer into thinking the collection under inspection is indexable.
It's useful, though, when you're scrolling around the field list of a
collection, to temporarily remember the fabricated indices of some
elements of interest.

      For a set with the first element being the character with value
65, I guess I'd like to see "1: $A" in the field list and "Character
value: 65" in the value pane. I want the contents of the value pane to
be something I can evaluate (and, especially, "debug it"), and which
presents on sight a meaningful class to browse.


      thanks for asking!

-C

--
Craig Latta :: research computer scientist
Black Page Digital :: Berkeley, California
663137D7940BF5C0AFC  1349FB2ADA32C4D5314CE