03-07-2024, 07:02 AM
I am building a popupmenu doing
m = new popupMenu();
m["x1"] = o => { ... }
etc.
sel = m.Show();
(ok, it's more complex than that - but you get the idea.)
It dawned on me that I should check if the user pressed <Esc> (and possibly undo a few things). According to the doc, sel will be =0 if Esc and id of selected item otherwise.
Well...test have shown me that m["x1"] does not have an id. How can I assign one? (I can't figure out from the doc...)
m = new popupMenu();
m["x1"] = o => { ... }
etc.
sel = m.Show();
(ok, it's more complex than that - but you get the idea.)
It dawned on me that I should check if the user pressed <Esc> (and possibly undo a few things). According to the doc, sel will be =0 if Esc and id of selected item otherwise.
Well...test have shown me that m["x1"] does not have an id. How can I assign one? (I can't figure out from the doc...)