r/GoogleAppsScript • u/SnooGoats1303 • Jul 14 '25
Question Getting around menuing limitations
given
const ui = SpreadsheetApp.;
ui.
it was annoying that .addItem required two strings. Now I think I've worked out how to circumvent that requirement. So instead of
.
I use this function
const nameOf = : ;
and define menu entries as
.
Am I reinventing the wheel? Is this what everyone else does?
0
Upvotes
2
u/stellar_cellar Jul 14 '25
The second string parameter for the addItem() is the name of the function you are invoked. What exactly are you trying to achieve with the nameof function?
1
u/WicketTheQuerent Jul 14 '25
Yes you are.
Not everyone do that.