Added a mention of the use of caller.ndb._menutree in the docs to EvMenu.
This commit is contained in:
parent
0c7ee1bdfc
commit
cd211d9901
1 changed files with 5 additions and 1 deletions
|
|
@ -45,6 +45,11 @@ entered to get to this node). The node function code will only be
|
||||||
executed once per node-visit and the system will accept nodes with
|
executed once per node-visit and the system will accept nodes with
|
||||||
both one or two arguments interchangeably.
|
both one or two arguments interchangeably.
|
||||||
|
|
||||||
|
The menu tree itself is available on the caller as
|
||||||
|
`caller.ndb._menutree`. This makes it a convenient place to store
|
||||||
|
temporary state variables between nodes, since this NAttribute is
|
||||||
|
deleted when the menu is exited.
|
||||||
|
|
||||||
The return values must be given in the above order, but each can be
|
The return values must be given in the above order, but each can be
|
||||||
returned as None as well. If the options are returned as None, the
|
returned as None as well. If the options are returned as None, the
|
||||||
menu is immediately exited and the default "look" command is called.
|
menu is immediately exited and the default "look" command is called.
|
||||||
|
|
@ -203,7 +208,6 @@ class CmdEvMenuNode(Command):
|
||||||
cmd_on_quit = menu.cmd_on_quit
|
cmd_on_quit = menu.cmd_on_quit
|
||||||
default = menu.default
|
default = menu.default
|
||||||
|
|
||||||
print "cmd, options:", cmd, options
|
|
||||||
if cmd in options:
|
if cmd in options:
|
||||||
# this will overload the other commands
|
# this will overload the other commands
|
||||||
# if it has the same name!
|
# if it has the same name!
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue