Exception when opening app on Mac

Hi
I built my app on Xojo windows.
Have installed Xojo on my Mac.
Copied accros the project file.
Opened it on Mac.
Performed the build on the Mac.
When trying to run the app, I get the message :-
“An exception of class MenuHasParent was not handled. The application must shut down”

What does this mean ? What do i need to tweak ?

Thanks

MenuHasParentException occurs when code tries to use the same MenuItem in different places.

https://docs.xojo.com/MenuHasParentException

Something with your MenuItem code. You should leave “Break on Exceptions” on, and the debugger will pause on the line causing the problem.

maybe you assign the menubar manually to windows?

Break on exceptions is on. it starts by doing the build and nothing happens, clicking the run icon again produces the error.

When I click on the menu bar, it has the apple setting
Am i looking in the right place ?

This behavior doesn’t sound like the normal flow for exceptions, I don’t suppose your project is small enough to share?

Update: Unless your exception is occurring as the app opens. But then you should see a line of code highlighted in the debugger.

By changing the menu setting to ‘ApplicationMenuItem’ the crash no longer happens - however I dont see the menu item appear at all.

Also tried setting it to ‘AppleMenuItem’ same result

Im talking about the ‘Super’ setting

The project is small and just in its initial stage - how do I share it ?

That’s interesting. Which item did you change the super on? AppleMenuItem and ApplicationMenuItem have specific uses for moving the menu item on Mac.

You will need to upload it somewhere. Cloud drive options like Dropbox and OneDrive will let you create a sharable link. If you have your own webspace you can use that. Save the project as XML or Binary to share it.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.