Menu parent exception

I’d like to change the menu bar, at the beginning before I open any window, by adding a menu and moving some menuitems form another one to this menu.
However, I get a parent exception.
Seems not that easy. Any help?

The documentation MenuHasParentException tells you what to do…
Clone.

Thanks, but I just want to move it, not use it in two different places…
So copying it means cloning it, then kill the old one by removing it?

And how do I change the super from e.g. AppleMenuitem to ‘normal’ Menuitem after cloning?

What are you really trying to do? Describe the effect, not the tools.

Thanks for your helpful response…
Well, I have an application which I compile in macOS and Windows.
In macOS, Prefs and Quit etc. will appear not in the File menu (due to the super specification), but in Windows it still will at the bottom of it. My intention is: if it is a #window app, I create a separate App menu, and move all relevant menuitems into that menu (despite it may be not Windows standard, but more logical as a Mac; it’s my program anyway, isn’t it?).
That’s why I was looking for simple help here, since it seems a bit complicated and illogical to do this.

Ok, I managed now to do what I wanted. Thanks for support and pushing. Btw, the super isn’t necessary to change, since Windows doesn’t care if theses are special menuitems.