Chris Cunningham uploaded a new version of Tools to project The Inbox:
http://source.squeak.org/inbox/Tools-cbc.972.mcz ==================== Summary ==================== Name: Tools-cbc.972 Author: cbc Time: 5 June 2020, 5:21:18.741315 pm UUID: 50b03b92-aa1d-4e4a-91fd-be3648f39855 Ancestors: Tools-mt.970 Enhance ObjectExlporer>>copyValue to copy a string that would re-constitute the base value using the representation show in the explorer. An explicit example: If your are exploring the integer 42 and choose the menu item 'copy value' from the menu while hovering over the "binary '0010 1010'" (or "binary '101010"), it will copy the string '2r101010' to the clipboard. This is extensible to other objects as well, but currently only supports Integer display options. =============== Diff against Tools-mt.970 =============== Item was added: + ----- Method: Integer>>valueStringForDisplayMethod: (in category '*Tools-Explorer') ----- + valueStringForDisplayMethod: displayMethod + displayMethod = 'hexadecimal' ifTrue: [^'16r', (self printStringBase: 16)]. + displayMethod = 'octal' ifTrue: [^'8r', (self printStringBase: 8)]. + displayMethod = 'binary' ifTrue: [^'2r', (self printStringBase: 2)]. + ^self asStringOrText ! Item was changed: ----- Method: ObjectExplorer>>copyValue (in category 'menus - actions') ----- copyValue "Copy a description of the value of the current variable, so the user can paste it into the window below and work with it." + | value | + value := (self currentParent value respondsTo: #valueStringForDisplayMethod:) + ifTrue: [self currentParent value valueStringForDisplayMethod: self currentSelection key] + ifFalse: [self currentSelection value]. + Clipboard clipboardText: value asStringOrText.! - - Clipboard clipboardText: self currentSelection value asStringOrText. ! |
Hi. This is what I originally wanted to do (that Christoph for pointing out my mistake). Tests run acceptable afterwards - same failure (timeout for WeakSetInspectorTest>>#testSymbolTableM6812) and error (out of bounds for CompiledCodeInspectorTest>>#testValuePaneModify) in ToolsTests after loading this as there were in a raw fully updated Trunk image. -cbc On Fri, Jun 5, 2020 at 5:21 PM <[hidden email]> wrote: Chris Cunningham uploaded a new version of Tools to project The Inbox: |
Free forum by Nabble | Edit this page |