aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docbook/wsluarm.adoc15
1 files changed, 10 insertions, 5 deletions
diff --git a/docbook/wsluarm.adoc b/docbook/wsluarm.adoc
index cc1989e497..2eb16476b4 100644
--- a/docbook/wsluarm.adoc
+++ b/docbook/wsluarm.adoc
@@ -51,12 +51,8 @@ and then opens a text window with the output.
[source,lua]
----
-if gui_enabled() then
- local splash = TextWindow.new("Hello!");
- splash:set("This time wireshark has been enhanced with a useless feature.\n")
- splash:append("Go to 'Tools->Lua Dialog Test' and check it out!")
-end
+-- Define the menu entry's callback
local function dialog_menu()
local function dialog_func(person,eyes,hair)
local window = TextWindow.new("Person Info");
@@ -67,7 +63,16 @@ local function dialog_menu()
new_dialog("Dialog Test",dialog_func,"A Person","Eyes","Hair")
end
+-- Create the menu entry
register_menu("Lua Dialog Test",dialog_menu,MENU_TOOLS_UNSORTED)
+
+-- Notify the user that the menu was created
+if gui_enabled() then
+ local splash = TextWindow.new("Hello!");
+ splash:set("Wireshark has been enhanced with a useless feature.\n")
+ splash:append("Go to 'Tools->Lua Dialog Test' and check it out!")
+end
+
----
[[wslua_dissector_example]]