Adapt contextmenu to actions
this PR adapts the examples and explanations to the new action architecture, that will be used to add context menus and keybindings to presenters.
Thanks esteban. @koendehondt I will not integrate it immediately so that we can update the code in the code repo.
also, code is not yet integrated into the image so... better to wait a bit. But I wanted to start fixing this otherwise I will forget it later ;)
Oki
@estebanlm I see that you introduced commands in chapters before the chapter on Commander. Using concepts before they are introduced is not a good idea. I propose to keep the menus in the chapters before the Commander chapter and use commands only in the Commander chapter.
thing is, there is not anymore just menus, they are now handled through actions (which are, indeed, "generic" commands). you can introduce actions as simple definitions, that define both "visible" actions which will be displayed as context menus and "not visible" actions that will be accessible through shortcuts. later you can use it and "level up" the complexity by explaining the whole commander.
thing is, there is not anymore just menus, they are now handled through actions (which are, indeed, "generic" commands). you can introduce actions as simple definitions, that define both "visible" actions which will be displayed as context menus and "not visible" actions that will be accessible through shortcuts. later you can use it and "level up" the complexity by explaining the whole commander.
Could you explain what you mean with "now" in " they are now handled through actions"? Do you refer to a particular Pharo version?
@estebanlm, @Ducasse and I discussed this PR. We will not merge it because it requires Pharo 13 and the book uses Pharo 12.
I applied this change suggested by this PR: https://github.com/SquareBracketAssociates/CodeOfSpec20Book/commit/ea88929a2a679e5081ce2824a15c510ff84db16a.
Let's not delete this PR so that it can serve as the basis for the book upgrade to Pharo 13, sometime during the year 2025.