BuildingApplicationWithSpec2 icon indicating copy to clipboard operation
BuildingApplicationWithSpec2 copied to clipboard

Adapt contextmenu to actions

Open estebanlm opened this issue 1 year ago • 7 comments

this PR adapts the examples and explanations to the new action architecture, that will be used to add context menus and keybindings to presenters.

estebanlm avatar Sep 19 '24 10:09 estebanlm

Thanks esteban. @koendehondt I will not integrate it immediately so that we can update the code in the code repo.

Ducasse avatar Sep 19 '24 13:09 Ducasse

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 ;)

estebanlm avatar Sep 19 '24 14:09 estebanlm

Oki

Ducasse avatar Sep 19 '24 14:09 Ducasse

@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.

koendehondt avatar Sep 19 '24 15:09 koendehondt

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.

estebanlm avatar Sep 19 '24 16:09 estebanlm

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?

koendehondt avatar Sep 22 '24 13:09 koendehondt

@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.

koendehondt avatar Sep 27 '24 13:09 koendehondt