NewTools icon indicating copy to clipboard operation
NewTools copied to clipboard

Duplicated logic for showing the shortcuts

Open jordanmontt opened this issue 8 months ago • 0 comments

The text shown for the shortcuts, this one:

Sans titre

Is defined in this method through the keyText: message. Like this:

menuCommandOn: aBuilder
	<worldMenu>
	(aBuilder item: #Playground)
		parent: #InputOutput;
		action: [ Smalltalk tools openWorkspace ];
		order: 1;
		keyText: 'o, p';
		help: 'A window used as a scratchpad area where fragments of Pharo code can be entered, stored, edited, and evaluated.';
		iconName: #workspace

But, the shortcuts themselves are defined here:

PharoShortcuts >> openPlaygroundShortcut
	^ $o meta, $p meta

This causes duplicated logic.

jordanmontt avatar May 31 '24 11:05 jordanmontt