FROM : Peter Maurer
DATE : Mon Nov 12 23:15:36 2007
Hey Peter and Ken,
thanks for taking the time to respond.
> Can you use -[NSStatusItem setMenu:]? If not, could you please file a
> bug describing why?
Unfortunately, I can't. These are status items that also serve as drag
& drop targets and one-click action triggers, depending on their
context. In fact, my application's needs are so special that even this
strategy ...
> You may use -[NSStatusItem popUpStatusItemMenu:] to pop up an
> arbitrary menu with the correct appearance for a main menu (the
> sharp top corners).
... doesn't really work out, because this application pops up its
NSStatusItem menus via PopUpMenuSelect() after getting their MenRefs
by means of the undocumented _NSGetCarbonMenu() function. So filing a
bug is kind of pointless, I guess. And I know that every time I use
undocumented calls a little kitten dies, but it was the only way to
achieve certain things (e.g., populate NSMenus while traversing them
in order to browse your file system from a NSStatusItem) back in the
Mac OS X 10.2 days.
Right now, I am actually rewriting these parts of my application to
use -[NSStatusItem popUpStatusItemMenu:] in a new version that won't
have to support 10.2 anymore; but that will take some more time, and
in the mean time, I had hoped there would be a quick and dirty way to
fix this cosmetic issues for Leopard users. However, if there isn't, I
can live with that, too. Turns out it doesn't look quite as ridiculous
if I simply move my menus 4 units to the left when running on Leopard.
BTW: I've always fantasized about being able to use the proper Dock
context menu style (the one that "points" to a Dock icon), instead of
having to ape it. But since we can't even change the corners'
appearance, I guess that's out of the question completely. ;-)
Thanks again!
Peter.
DATE : Mon Nov 12 23:15:36 2007
Hey Peter and Ken,
thanks for taking the time to respond.
> Can you use -[NSStatusItem setMenu:]? If not, could you please file a
> bug describing why?
Unfortunately, I can't. These are status items that also serve as drag
& drop targets and one-click action triggers, depending on their
context. In fact, my application's needs are so special that even this
strategy ...
> You may use -[NSStatusItem popUpStatusItemMenu:] to pop up an
> arbitrary menu with the correct appearance for a main menu (the
> sharp top corners).
... doesn't really work out, because this application pops up its
NSStatusItem menus via PopUpMenuSelect() after getting their MenRefs
by means of the undocumented _NSGetCarbonMenu() function. So filing a
bug is kind of pointless, I guess. And I know that every time I use
undocumented calls a little kitten dies, but it was the only way to
achieve certain things (e.g., populate NSMenus while traversing them
in order to browse your file system from a NSStatusItem) back in the
Mac OS X 10.2 days.
Right now, I am actually rewriting these parts of my application to
use -[NSStatusItem popUpStatusItemMenu:] in a new version that won't
have to support 10.2 anymore; but that will take some more time, and
in the mean time, I had hoped there would be a quick and dirty way to
fix this cosmetic issues for Leopard users. However, if there isn't, I
can live with that, too. Turns out it doesn't look quite as ridiculous
if I simply move my menus 4 units to the left when running on Leopard.
BTW: I've always fantasized about being able to use the proper Dock
context menu style (the one that "points" to a Dock icon), instead of
having to ape it. But since we can't even change the corners'
appearance, I guess that's out of the question completely. ;-)
Thanks again!
Peter.
| Related mails | Author | Date |
|---|---|---|
| Peter Maurer | Nov 10, 10:15 | |
| Ken Ferry | Nov 12, 21:50 | |
| Peter Ammon | Nov 12, 22:13 | |
| Peter Maurer | Nov 12, 23:15 | |
| John Stiles | Nov 12, 23:40 | |
| David Alger | Nov 13, 01:58 | |
| Rainer Brockerhoff | Nov 13, 02:06 | |
| Peter Ammon | Nov 13, 04:19 | |
| John Stiles | Nov 13, 04:42 | |
| David Alger | Nov 13, 16:30 | |
| Pleasant Software… | Nov 13, 16:49 | |
| John Stiles | Nov 13, 17:37 | |
| David Alger | Nov 13, 17:50 | |
| Rainer Brockerhoff | Nov 13, 19:58 | |
| David Alger | Nov 13, 20:11 | |
| Uli Kusterer | Nov 13, 21:41 | |
| Rainer Brockerhoff | Nov 13, 21:51 | |
| David Alger | Nov 14, 02:26 | |
| Peter Maurer | Nov 14, 14:31 |






Cocoa mail archive

