[squeak-dev] The Inbox: Tools-cbc.766.mcz
H. Hirzel
hannes.hirzel at gmail.com
Mon Sep 18 16:07:48 UTC 2017
Thank you for adding the 'copy value' menu entry in object explorer to
the trunk.
This is very useful.
--Hannes
On 9/17/17, David T. Lewis <lewis at mail.msen.com> wrote:
> Good idea, moved to trunk. I noticed that some of the objects that might
> be values do not respond to #asText, so I did an additional update to call
> #asStringOrText to ensure that the value is always something that can be
> treated as a Text in the Clipboard.
>
> Dave
>
>
> On Fri, Sep 15, 2017 at 01:41:00PM -0700, Chris Cunningham wrote:
>> Hi.
>>
>> I've been finding myself wanting to copy value out of objects for use
>> elsewhere and being annoyed at having to select the item, open an
>> inspector
>> on it, selecting the value, selecting the displayed value in the other
>> window, then finally copying the value just so I can paste it elsewhere.
>>
>> This change add a menu item to the ObjectExplorer called 'copy value' that
>> just copies the value of the selected item.
>>
>> I tried putting this into the Inspector as well (since it also had a
>> related 'copy name(c)' item), but that code is broken. At least for
>> OrderedCollections and Arrays, you don't actually get what you want. For
>> OrderedCollections, it raises an error. If you try copy name on an array
>> of strings, say, it will give you an expression that will return the first
>> character of the string you were on (if you manage to change the selector
>> correctly before using the expression). I suspect this bit of
>> functionality in the Inspector needs some love and care. Assuming anyone
>> uses it, that is.
>>
>> -cbc
>>
>> On Fri, Sep 15, 2017 at 1:33 PM, <commits at source.squeak.org> wrote:
>>
>> > A new version of Tools was added to project The Inbox:
>> > http://source.squeak.org/inbox/Tools-cbc.766.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: Tools-cbc.766
>> > Author: cbc
>> > Time: 15 September 2017, 1:32:51.722459 pm
>> > UUID: 7fd4bc5e-35b0-954e-91f3-a1cd65adee00
>> > Ancestors: Tools-eem.765
>> >
>> > For Explorers, add a menu item 'Copy value' (similar to Copy name) that
>> > copies the value of the selected item, suitable for use elsewhere.
>> >
>> > =============== Diff against Tools-eem.765 ===============
>> >
>> > Item was added:
>> > + ----- Method: ObjectExplorer>>copyValue (in category 'menus -
>> > actions')
>> > -----
>> > + copyValue
>> > + "Copy the name of the current variable, so the user can paste it
>> > into the window below and work with is."
>> > +
>> > + Clipboard clipboardText: self currentSelection value. !
>> >
>> > Item was changed:
>> > ----- Method: ObjectExplorer>>mainTreeListMenu: (in category 'menus')
>> > -----
>> > mainTreeListMenu: aMenu
>> > <treeListMenu>
>> >
>> > aMenu addStayUpItemSpecial.
>> >
>> > aMenu addList: #(
>> > ('inspect (i)'
>> > inspectSelection)
>> > ('explore (I)'
>> > exploreSelection)
>> > -
>> > ('method refs to this inst var'
>> > referencesToSelection)
>> > ('methods storing into this inst var' defsOfSelection)
>> > ('objects pointing to this value'
>> > objectReferencesToSelection)
>> > ('chase pointers'
>> > chasePointersForSelection)
>> > ('explore pointers'
>> > explorePointersForSelection)
>> > -
>> > ('browse full (b)'
>> > browseFull)
>> > ('browse class'
>> > browseClass)
>> > ('browse hierarchy (h)'
>> > classHierarchy)
>> > ('browse protocol (p)'
>> > browseFullProtocol)
>> > -
>> > ('references... (r)'
>> > browseVariableReferences)
>> > ('assignments... (a)'
>> > browseVariableAssignments)
>> > ('class refs (N)'
>> > browseClassRefs)
>> > -
>> > ('copy name (c)'
>> > copyName)
>> > + ('copy value'
>> > copyValue)
>> > ('basic inspect'
>> > inspectBasic)).
>> >
>> > Smalltalk isMorphic ifTrue: [
>> > aMenu addList: #(
>> > -
>> > ('viewer for this value (v)'
>> > viewerForValue))].
>> >
>> > aMenu addList: #(
>> > -
>> > ('monitor changes' monitorSelection)).
>> >
>> > monitorList isEmptyOrNil ifFalse: [
>> > aMenu addList: #(
>> > ('stop monitoring all'
>> > stopMonitoring))].
>> >
>> > ^ aMenu!
>> >
>> >
>> >
>
>>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copy_value_menu_entry_in_object_explorer_Screenshot_2017-09-18.png
Type: image/png
Size: 69527 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170918/f658bdf2/attachment-0001.png>
More information about the Squeak-dev
mailing list
|