For reference: what's aBuilder when you see <worldMenu>
Posted by DougEdmunds on Apr 15, 2011; 10:22pm
URL: https://forum.world.st/For-reference-what-s-aBuilder-when-you-see-worldMenu-tp3453120.html
When I got to methods involving menus and using pragmas, i.e., words in pointy brackets, such as <worldMenu>, I ran across most of them using the parameter 'aBuilder'.
Since there is no class 'Builder' the question becomes what is 'aBuilder'? Since the core contains somewhere around 60 classes that contain the word 'Builder', this is not easily answered.
Thanks to the CollaborActive Book, there is an answer.
Section 3.4 currently states:
"The class WorldState builds the world menu using a PragmaMenuBuilder passed to all methods defining the <worldMenu> pragma."
So presumably, wherever there is 'aBuilder', mentally change that to 'aPragmaMenuBuilder', and you will be able to start figuring out what things like
(aBuilder item: #System)
order: 3.0;
are talking about. For example, since PragmaMenuBuilder does not have a method 'item:' but it inherits from MenuRegistration, which does, you can look at the class MenuRegistration to figure out what 'aBuilder' is doing with #System, before whatever that is does something with order: :)