Menubar item problem

Norman - thank you very much - but I am now in the same situation:

I have “About this Software” in under my Application menu - FANTASTIC :slight_smile:
BUT - I still have an unwanted “Untitled” menu, showing :frowning:

I highly (strongly) suggest that you NEVER EVER remove the FILE and EDIT menus…
Set Visible for them to false in APP.OPEN… .but NEVER remove them.

Your about CANNOT be a top level menu (which is what you have it as)… this is why it is not appearing where you want it…

Restore the File and Edit menus, put ABOUT in the FILE menu where it should go, set the AppleMenuItem and it will move when the program runs.

Without the EDIT menu, CUT/PASTE/COPY etc will not work

Dave / Michel - norman’s video has almost done what I need, except it leaves the unwanted Untitled menu displayed.

Just delete Untitled…

When I delete Untitled - the About this Software also gets automatically deleted - this is my problem.
It’s acting erratic.

There should be no “Untitled” items if all the steps from the previous post have been completed.

Here are rest of the steps.

  • In the project “CONTENTS” view, click on the “Window1” and select “Menu Handler” from the Xojo menu. This will add “Menu Handlers” under the “Window1” in the project “CONTENTS” view. There will also be an “Untitled” item under “Menu Handlers”.

  • Click on the “Untitled” in project “CONTENTS” view and select “HelpAbout” from the “Menuitem Name” drop list on the right hand side. The “Untiled” in the project “CONTENTS” view should change its name to “HelpAbout”.

  • While the “HelpAbout” is selected in the project “CONTENTS” view, click below the “HelpAbout as Boolean” to add the handler code for this “HelpAbout” menu item.

Syed - take a look at Normans Video - you can clearly see that the Untitled menu remains.
All I need to do is be able to remove / hide that Untitled menu BUT ALSO KEEP the About this Software in the Application menu.

Hope that made more sense :slight_smile:

I got it. In the video, Norman created a new menu called Untitled.

You do not do that.

Create your new menu item ‘About’ in Files, set its super to AppleMenuItem, and at runtime, it will appear where you want it, not in File.

Now, all you want to do is to select the Untitled menu and press Delete.

Michel - that would work fine if I had a File menu - but I have deleted the File and Edit menus as they are not needed.

I will delete my menubar and create a new one with both the file and edit menus - and see what happens :slight_smile:

Thanks.

Like I said before, hide the menu in App.Open.

Everyone:

I took Michel’s advice and I now have About this Software under the Application menu - PERFECT.
I have 2 other menus - File (which is totally empty), and Edit, which is unneeded.

Dave recommends that I should never delete them - simply hide them.
I will now try to hide at least the file menu.

What is the difference between hiding them and deleting them - in other words - why is it ok to hide them, but not to delete them - just curious :slight_smile:

[quote=94193:@Richard Summers]Michel - that would work fine if I had a File menu - but I have deleted the File and Edit menus as they are not needed.

I will delete my menubar and create a new one with both the file and edit menus - and see what happens :)[/quote]

If you ever want to place your app in the MAS, you must have the Edit menu at a minimum. Otherwise your app will be rejected for not conform to Apple UI guidelines.

Recreate your Edit menu by taking example from a new project menu bar (you cannot copy/paste), and add your about to it.

Because… FILE is the reccomended location for things like ABOUT, QUIT etc
and EDIT is required for Cut/Paste/Copy shortcut keys to work… unless you want to implement your own events

Michel - I now have everything woking perfectly (Phew - that was an effort) :slight_smile:
I have hidden the File menu but left the Edit menu visible.

Dave, do you think it is better to always have both (file and edit) visible?
File would only contain Quit, and edit would contain the usual default.

Would it be unacceptable for an app to show neither?
I ask because the is an option to quit the app from the Application menu - and therefore thought it would be ok to hide the file menu?

Thank you all for all the help and recommendations :slight_smile:

On a Mac – depending on your app – I don’t see why File menu should be necessary. Even some of Apple’s apps don’t have it. Edit menu probably is necessary, if there’s a possibility that a user would need to Cut/Copy/Paste. Or Undo/Redo/Select All.

Visible only if it makes sense to your app… but do NOT delete them… trust me it will cause more trouble that putting a line or two in the APP.OPEN event to set their VISIBLE=FALSE… plus all the AppleMenu/Pref items DO still work properly

I bet they do… but hidden… for exactly the same types of reasons stated above.
Not that I can think of an Apple app off the top of my head that DOESN’T have them

Thanks Dave - from now on I will always keep both the file and edit menus (and hide what is not necessary).

Now that the serious matter is out of the way, one can point out the missing “This Universe”.

Syed ??? :slight_smile:

… from your “Location”.