[squeak-dev] The Inbox: Tools-cbc.766.mcz
David T. Lewis
lewis at mail.msen.com
Sun Sep 17 00:55:52 UTC 2017
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!
> >
> >
> >
>
More information about the Squeak-dev
mailing list
|