# TaskBarIcon in OS X

**URL:** <https://www.ruby-forum.com/t/taskbaricon-in-os-x/131895>\
**Category:** wxRuby\
**Created:** [March 14, 2008, 5:42am UTC](https://www.ruby-forum.com/t/taskbaricon-in-os-x/131895 "2008-03-14T05:42:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zdavidlnx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/839c29/32.png) [@zdavidlnx](https://www.ruby-forum.com/u/zdavidlnx)\
**Post date:** [March 14, 2008, 5:42am UTC](https://www.ruby-forum.com/t/taskbaricon-in-os-x/131895/1 "2008-03-14T05:42:15Z")

</div>

Is the Wx:TaskBarIcon supported under OS X? I can’t seem to get it  
working. My code works under Windows, but not OS X. I thought it was  
something I was doing, so I tried the bigdemo.rb sample and that  
doesnt’ seem to like OS X either.

I’m running OS X 10.5 with wxRuby 1.9.5 gem and ruby 1.8.6.

-dave

---

<div class="post-metadata">

**Author:** ![zdavidlnx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/839c29/32.png) [@zdavidlnx](https://www.ruby-forum.com/u/zdavidlnx)\
**Post date:** [March 14, 2008, 10:10am UTC](https://www.ruby-forum.com/t/taskbaricon-in-os-x/131895/2 "2008-03-14T10:10:46Z")

</div>

David G. wrote:

> Is the Wx:TaskBarIcon supported under OS X? I can’t seem to get it  
> working. My code works under Windows, but not OS X. I thought it was  
> something I was doing, so I tried the bigdemo.rb sample and that  
> doesnt’ seem to like OS X either.  
> It does work, but perhaps not in the way you were expecting. wxWidgets  
> considers the ‘TaskBar’ on OS X to be the dock; if you run bigdemo, you  
> should see that the icon in the dock is changed, and has the taskbar  
> menu associated with it.

The purpose of the standard desktop elements (eg dock, menu bar, Windows  
taskbar) don’t map exactly from OS to OS, but I think this is seen as  
the closest equivalent. According to the Apple HIG, the area on the  
right of the Menu Bar, where the power status, volume, clock etc is  
“reserved for use by Apple”.

[http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMOSXEnvironment/chapter\_8\_section\_4.html#//apple\_ref/doc/uid/TP40002721-TPXREF139](http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMOSXEnvironment/chapter_8_section_4.html#//apple_ref/doc/uid/TP40002721-TPXREF139)  
[http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMenus/chapter\_17\_section\_4.html#//apple\_ref/doc/uid/TP30000356-CHDFJEAC](http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMenus/chapter_17_section_4.html#//apple_ref/doc/uid/TP30000356-CHDFJEAC)

PS - there does seem to be a bug on OS X changing the Doc icon. But  
otherwise it works fine.

cheers  
alex

---

<div class="post-metadata">

**Author:** ![zdavidlnx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/839c29/32.png) [@zdavidlnx](https://www.ruby-forum.com/u/zdavidlnx)\
**Post date:** [March 14, 2008, 7:44pm UTC](https://www.ruby-forum.com/t/taskbaricon-in-os-x/131895/3 "2008-03-14T19:44:13Z")

</div>

Thanks, Alex. You are correct. It does work, just not in the way I was  
looking for. Actually, I have come to expect apps to have an icon on  
the right of the menu bar if they are meant to run in the  
background…like Skype, GMail notifier, etc. I never knew that Apple  
considered that incorrect. I’ve never used a menu from the dock icon  
either, but now that I’m checking some of my favorite apps out they  
have some pretty useful features in there. Very good to know!

I don’t know if this is a issue better taken up with the wxWidgets  
developers, but you may consider (even though the Apple HIG guidelines  
frown on it) that developers will want to be able to put icons on the  
right side of the menu bar.

-dave

---

<div class="post-metadata">

**Author:** ![zdavidlnx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/839c29/32.png) [@zdavidlnx](https://www.ruby-forum.com/u/zdavidlnx)\
**Post date:** [March 15, 2008, 2:55pm UTC](https://www.ruby-forum.com/t/taskbaricon-in-os-x/131895/4 "2008-03-15T14:55:05Z")

</div>

David G. wrote:

> I don’t know if this is a issue better taken up with the wxWidgets  
> developers, but you may consider (even though the Apple HIG guidelines  
> frown on it) that developers will want to be able to put icons on the  
> right side of the menu bar.

It’s something that would be implemented in wxWidgets. It’s been  
discussed before:  
[http://lists.wxwidgets.org/archive/wx-dev/msg40258.html](http://lists.wxwidgets.org/archive/wx-dev/msg40258.html)

but it seems to be ruled out by one of the wxWidgets OS X lead devs:  
[http://lists.wxwidgets.org/archive/wx-dev/msg40273.html](http://lists.wxwidgets.org/archive/wx-dev/msg40273.html)

FWIW, I agree with that reasoning.

If you were really certain that a menu bar icon was what you wanted, you  
might be able to create one using Ruby Cocoa. From that htread, looks  
like the relevant class is NSStatusBarItem.

cheers  
alex
