Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1666.mcz==================== Summary ====================
Name: Morphic-mt.1666
Author: mt
Time: 8 June 2020, 11:13:50.055961 am
UUID: 8be3a7c3-69d8-2845-8a7c-759c8bfd1470
Ancestors: Morphic-mt.1665
Adds a small hook to support parent-controlled print-strings for objects in the object explorer. Parent objects would return custom subclasses of ObjectExplorerWrapper when ansering the #explorerContents. Think of, for example, custom string representations for numbers being embedded in your domain objects.
=============== Diff against Morphic-mt.1665 ===============
Item was changed:
----- Method: ObjectExplorerWrapper>>asString (in category 'converting') -----
asString
| explorerString label separator |
explorerString :=
+ [self objectString]
- [self object asExplorerString]
on: Error
do: ['<error: ', self object class name, ' in asExplorerString: evaluate "' , self itemName , ' asExplorerString" to debug>'].
(explorerString includes: Character cr)
ifTrue: [explorerString := explorerString withSeparatorsCompacted].
label := self itemName ifNil: [''].
(label includes: Character cr)
ifTrue: [label := label withSeparatorsCompacted].
separator := self class showContentsInColumns
ifTrue: [String tab]
ifFalse: [label ifEmpty: [''] ifNotEmpty: [': ']].
^ '{1}{2}{3}' format: {label. separator. explorerString}!
Item was added:
+ ----- Method: ObjectExplorerWrapper>>objectString (in category 'accessing') -----
+ objectString
+ "Answers a string representation of the object that well be combined with #itemName when requested from the tree model. Overwrite this in custom wrappers to modify parent-specific representations without having to modify #asExplorerString in the particular object."
+
+ ^ self object asExplorerString!