[Cocoa-sharp] StatusBar / StatusItem

Karl Pitrich pit at red-trade.com
Fri Dec 8 15:18:48 EST 2006


Hello,

got a brand new MacBook Pro an am new to Cocoa itself but quite accomplished
with C#.

I using a SVN'ed cocoasharp from today with the current .dmg mono.

I experience problems trying to add an item to SystemStatusBar.

I used HelloWorld.cs and added:
  ...
  public StatusBar sb;
  public StatusItem si;

  public HelloWorld (IntPtr native_object) : base (native_object) {
      sb = StatusBar.SystemStatusBar;
      si = sb.StatusItemWithLength(
          (double)StatusItemLength.VariableStatusItemLength);

      si.HighlightMode = true;
      si.Title = @"pit";
  }
  ...

To the constructor, but that does not show any text in the status bar.
I checked with a ObjC statusitem-sample and the calls that cocoa does seem
to be the same; I have, however, no idea how the ObjC marshalling/bridge
stuff works.

Can anyone please provide a working sample and/or tell me what I did wrong
or is wrong with the Status* objects?


Thanks,

 / pit

Sent using the Microsoft Entourage 2004 for Mac Test Drive.
**********************************************************************************************
IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the 
named recipient(s) only.
If you have received this email in error, please notify the system manager or the sender immediately and do 
not disclose the contents to anyone or make copies thereof.
*** eSafe scanned this email for viruses, vandals, and malicious content. ***
**********************************************************************************************



More information about the Cocoa-sharp mailing list