Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create editable inspectors #816

Open
hernanmd opened this issue Jul 30, 2024 · 0 comments
Open

Create editable inspectors #816

hernanmd opened this issue Jul 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@hernanmd
Copy link
Member

hernanmd commented Jul 30, 2024

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?

@hernanmd hernanmd added question Further information is requested enhancement New feature or request labels Jul 30, 2024
@hernanmd hernanmd self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant