Add a Print Entry in the File Menu by code

In a Window where I want to add a Print MenuItem, my code crash here:

File_Print.AddMenuAt(File_Menu.Count, File_Print)

The debugger do not show error nor Nil, nor…

Idea(s) on what can be wrong ?

File_Menu.AddMenuAt(File_Menu.Count, File_Print)

Is far better: the Menu Item is appended in FileMenu.

If you want to add to the end can you not simply say:

File_Menu.AddMenu( File_Print )

Also, worth checking your API versions. You can’t add a MenuItem to a DesktopMenu and vice versa. Make sure File_Menu and File_Print are both Desktop classes or both not.

Thank you Ian.

I am testing (prototyping) with 21r2.1, but I will use 2015r1…

So, I trashed this idea and simply add manually the MenuItem. Look the other entry (result).