NewTools
NewTools copied to clipboard
Create editable inspectors
This issue is related to #635.
Try to create a StInspectorEditCommand
StInspectorCommand << #StInspectorEditCommand
slots: {};
tag: 'Command';
package: 'NewTools-Inspector'
with the following execute method:
execute
self context rawInspectorPageOrNil
ifNotNil: [ : page |
| pageView pageViewColumns |
pageView := page retrievePresenter view.
pageViewColumns := pageView attributeTable columns.
pageViewColumns
detect: [ : c | c evaluation = #stringValue ]
ifFound: [ : col | col beEditable ].
pageView update ]
then edit the following method and open a Transcript:
SpStringTableColumn>>#initialize
super initialize.
'no editable' traceCr.
editable := false.
sortable := false
If you open an inspector and click the new Edit button in the top-right:
Dictionary new
at: 1 put: 'hola';
at: 2 put: 'bonjour';
yourself.
After making some clicks, it seems the inspector constantly recreates the Spec table, so any beEditable is useless.
Maybe we should have edit instead of inspect?