Pastey record_menu.e
- Posted by irv Oct 15, 2020
namespace record_menu constant tips = { -- here's what this menu does: "Insert a new record into the database table", "Edit the record currently selected in the view", "", "Delete the record currently selected in the view" } include GtkEngine.e --include record_funcs.e constant menu = create(GtkMenuItem,"_Record"), submenu = create(GtkMenu), items = create(GtkMenuItem,"gtk-add",_("Insert")) & create(GtkMenuItem,"gtk-edit",_("Edit")) & create(GtkSeparatorMenuItem) & create(GtkMenuItem,"gtk-delete",_("Delete")) for i = 1 to length(tips) do set(items[i],"tooltip text",tips[i]) end for set(menu,"submenu",submenu) add(submenu,items) add("MainWin:MenuBar",menu)
1. Comment by irv Oct 15, 2020
Why is include record_funcs.e commented out? So you can run and revise the user-interface without worrying about crashes. After you have written the needed functions, turn it back on.