[squeak-dev] The Trunk: Morphic-mt.1770.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Fri Jun 11 05:56:56 UTC 2021


Am 11.06.2021 07:55:03 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1770.mcz

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

Name: Morphic-mt.1770
Author: mt
Time: 11 June 2021, 7:54:44.535233 am
UUID: 538ca9f9-e591-3344-a2b9-e83cd482d4c8
Ancestors: Morphic-mt.1769

Updates representation of integers in ObjectExplorer. For a small discussion, see http://forum.world.st/The-Trunk-Morphic-mt-1769-mcz-tp5129501p5129804.html

Enables the use of #balloonText: for ObjectExplorerWrapper. Already used in FileDirectoryWrapper. Not available in basic ListItemWrapper. (Yet?)

=============== Diff against Morphic-mt.1769 ===============

Item was changed:
----- Method: Integer>>explorerContents (in category '*Morphic-Explorer') -----
explorerContents

+ ^ Array streamContents: [:stream |
+ #(
+ 'hex' 16 2 0 'hexadecimal, base 16'
+ 'oct' 8 3 0 'octal, base 8'
+ 'bin' 2 4 0 'binary, base 2'
+ 'bit' nil 4 8 'Logical bit field\- Two complement\- Infinite sign bits\- Try #bitAt:') groupsDo: [ :key :base :group :padding :balloon | | label |
+ label := self abs printStringBase: (base ifNil: [2]).
+ base ifNil: [
+ label := String streamContents: [:s |
+ (label size roundUpTo: padding) to: 1 by: -1 do: [:index |
+ s nextPutAll: (self bitAt: index) asString]]].
+ label := label
+ padded: #left
+ to: (label size roundUpTo: group) + padding
+ with: ((base isNil and: [self negative]) ifTrue: [$1] ifFalse: [$0]).
- ^#(
- ('hexadecimal' 16 2)
- ('octal' 8 3)
- ('binary' 2 4)) collect: [ :each | | label group |
- group := each third.
- label := self abs printStringBase: each second.
- label := label padded: #left to: (label size roundUpTo: group) with: $0.
label := String streamContents: [:s |
+ (self negative and: [base notNil]) ifTrue: [s nextPutAll: '-'].
+ base ifNil: [s nextPutAll: '... '].
+ (1 to: label size by: group)
+ do: [:index |
+ 1 to: group do: [:gIndex |
+ s nextPut: (label at: index + gIndex - 1)]]
+ separatedBy: [s space]].
+ stream nextPut: ((
+ ObjectExplorerWrapper
+ with: label
+ name: key
+ model: self)
+ balloonText: balloon withCRs;
+ yourself) ]]!
- self negative ifTrue: [s nextPutAll: '- '].
- (1 to: label size by: group)
- do: [:index |
- 1 to: group do: [:gIndex |
- s nextPut: (label at: index + gIndex - 1)]]
- separatedBy: [s space]].
-
- ObjectExplorerWrapper
- with: label
- name: each first translated
- model: self ]!

Item was changed:
ListItemWrapper subclass: #ObjectExplorerWrapper
+ instanceVariableNames: 'itemName parent balloonText'
- instanceVariableNames: 'itemName parent'
classVariableNames: 'ShowContentsInColumns'
poolDictionaries: ''
category: 'Morphic-Explorer'!

!ObjectExplorerWrapper commentStamp: 'pre 5/15/2017 21:23' prior: 0!
ObjectExplorerWrappers represent an item displayed in an object explorer tree. In addition to the common ListItemWrapper behavior it adds methods to refresh the list entry with updated values from the model. It is mostly used in #explorerContents methods to describe which instance variables of an object should be displayed in the explorer.

Additionally, the value displayed can be visualized with a small icon which is defined by the class of the value object through the method #iconOrThumbnailOfSize:.

Contributed by Bob Arning as part of the ObjectExplorer package.
!

Item was added:
+ ----- Method: ObjectExplorerWrapper>>balloonText (in category 'accessing') -----
+ balloonText
+
+ ^ balloonText!

Item was added:
+ ----- Method: ObjectExplorerWrapper>>balloonText: (in category 'accessing') -----
+ balloonText: stringOrNil
+
+ balloonText := stringOrNil.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210611/8ca78117/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 48846 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210611/8ca78117/attachment-0001.png>


More information about the Squeak-dev mailing list