Dev question: Tutorial on creating menu extras...

Jump to First Reply
Posted:
in macOS edited January 2014
Hi to any X developers out there. I've created a prog that could do with a menu extra. Im just wondering how would I go about making one? Is it worth it, is it simple? If you could point me in the way of a few tutorials I would be very grateful...



Thanks!

Oliver

Comments

  • Reply 1 of 3
    chuckerchucker Posts: 5,089member
    As far as I know, Apple disallowed non-Apple menu extras with the release of Jaguar.
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 3
    Actually, Apple has always looked down upon Menu Extras -- developers have to reverse engineer to private framework connections to get them to work. In 10.2, though, Apple took further steps to block out any 3rd party Menu Extras. There are hacks to get around this block, but I recommend against them.



    Status Menus, on the other hand, work just fine. Net Monitor is a great example of a Status Menu.
     0Likes 0Dislikes 0Informatives
  • Reply 3 of 3
    dwsdws Posts: 108member
    Forget the whole menu extras thing. Avoid hacking the system; especially if you want the users of your software to appreciate your work! Status Menus are an excellent tool for the developers (this assumes that you have 10.2 and its associated developer's tools).



    Apple has an example that will show you how to code it, called DeskPictAppDockMenu. Go get it from the Sample Code section of Apple's developer site.



    There are a number of examples of various programs that use Status Menus. One of the best resources for finding source code is HyperJeff's CocoaSource page: <a href="http://osx.hyperjeff.net/Apps/CocoaSource.html"; target="_blank">http://osx.hyperjeff.net/Apps/CocoaSource.html</a>;
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.