Menuitems that don't enable although there is a handler on the window

I got some menuitems in the Edit menu to insert special characters in a TextArea.

In one window, it works flawlessly. I added the menu handlers to do the job, and that’s it. The menuitems are automatically enabled.

In another window where I have copied a slightly different version of the menu handlers, the menuitems are never enabled. What gives ?

Did you copy the handlers by selecting them in the browser, copying, and pasting into the new window,

or use add menu handler on the second window then paste just the code inside the new method?

I seem to recall that copy and paste at one time was introducing an extra “function header and footer” in the paste step.

Are these MenuItems created dynamically ?

Also, make sure the copy/paste operation didn’t add a number to the end of the handlers.