Documentation

makemenu

makemenu

Syntax: zs.makemenu{prop-list}

Creates a new menu or modifies an existing menu and returns the Menu record. This uses the Lua class syntax of {prop-list} where {prop-list} is a table of property values. Some properties can be set by the index (position in the table), while other properties can be set by name.

The indexed properties are: Name, Value/Script, and Class. So, for example:

a = zs.makemenu{"mymenu", "commands", "myclass"}

will create an menu called "mymenu" in the class folder "myclass" with the "commands" as the value/script of the menu . This same menu could have been created with the syntax:

a = zs.makemenu{name="mymenu", value="commands", class="myclass"}

This key=value syntax allows you to set *any* of the properties of the Menu object at creation time directly.

Add comment

Login or register to post comments