I would like to build a menu extra with all the features seen in the system menu extras, but without to use the private class implemented by Apple.
Is that possible, or many of the features seen in the system menu extras depends from SystemUIServer?
views:
166answers:
2
+1
A:
If it were possible there would be a whole lot of them on the market because nobody really likes the anemic NSStatusItem API.
Azeem.Butt
2009-12-17 17:21:51
That is why some menu extras used the not documented class. What I am wondering is if that is done simply to avoid to re-write code or because it is not possible to write code that makes possible to move the menu extra when the command key is pressed together the left menu button.
kiamlaluno
2009-12-17 17:39:02
I understood the question. If you can find a third-party menu extra that doesn't run MenuCracker or some other hack to trick the OS into loading it, then you'll have a definitive answer. I personally have never seen one, and Apple's official stance on the matter is that it should not be possible.
Azeem.Butt
2009-12-17 18:13:27
It isn't. The status bar is provided by SystemUIServer; thus, drag-reordering, drag-adding, and drag-removing menu extras can all only be implemented by SystemUIServer.
Peter Hosey
2009-12-17 18:27:39
The correct answer is then that it is not possible to create such class because it should interact with SystemUIServer, and the details of how to do that are not publicly available.
kiamlaluno
2009-12-17 20:36:51
A:
It is not possible.
The features present in the system menu extras are implemented through SystemUIServer; a class that would implement those features should interact with SystemUIServer, which means that if SystemUIServer code is changed, also the class should be changed. Rather than creating a new class, it would be better to use the same class used by Apple, which is not documented (and that could be changed from Apple in any moment).
kiamlaluno
2009-12-19 09:35:22