[us...@lists.monobjc.net] NSStatusbar code doesn't work
Hi, I'm calling the following code in a AwakeFromNib: _statusItem = new NSStatusItem(); NSMenu menu = new NSMenu(); _statusItem = NSStatusBar.SystemStatusBar.StatusItemWithLength(32); _statusItem.Image = NSImage.ImageNamed(twitter); NSMenuItem menuItem = new NSMenuItem(Send tweet!,new IntPtr(),); menuItem.ActionEvent += new ActionEventHandler(showTweetWindow); menu.AddItem(menuItem); _statusItem.Menu = menu; What am I doing wrong to get my NSStatusItem? I translated this code from an Objective-C sample... Yvan
[us...@lists.monobjc.net] Overided KeyUp doesn't get called
Hi, In the following source file, I get the following unexpected behavior: using System; using Monobjc; using Monobjc.Cocoa; namespace YvanSoftware.TwitMenu { [ObjectiveCClass(LengthField)] public class NSTextField_Length : NSTextField { const int maxLength = 160; [ObjectiveCField(lblNumOfChars)] public NSTextField lblNumOfChars; public NSTextField_Length () : base() { } public NSTextField_Length (IntPtr i) :base(i) { } public override void KeyUp (NSEvent theEvent) { base.KeyUp (theEvent); keyUpHandler(); } void keyUpHandler() { Console.WriteLine(*** keyUp ***); // Never shows up... if (this.StringValue.Length = maxLength) { this.StringValue = this.StringValue.SubstringToIndex(maxLength); } lblNumOfChars.StringValue = Chars: + this.StringValue.Length.ToString() + / + maxLength.ToString(); } } } I commented where the error takes place: the line ***keyUp*** never shows up, but if I put it in the constructors such a statement, it gets properly executed. What do I need to do? Thanks, Yvan
[us...@lists.monobjc.net] Usage of external (static) libraries:
Hi, I'm trying to implement a static library in C#, but I don't know where to start. My question is how to implement a class for the eSellerate libs. Here's a list of the files of their SDK: * EWSLib.h * EWSMac-GC.framework * EWSMac.framework * EWSMacCompress-GC.tar.gz * EWSMacCompress.tar.gz * libEWS-GC.a * libEWS.a * libValidateUniversal.a * validateLib.h Thanks, Yvan
[us...@lists.monobjc.net] AuthorizationCreate equivalent?
Hi, How do I authorize my program to run with elevated privileges? In the Apple docs, they mention an example with the AuthorizationCreate function (http://developer.apple.com/mac/library/documentation/Security/Conceptua l/authorization_concepts/03authtasks/authtasks.html#//apple_ref/doc/uid/ TP3995-CH206-BBCHCEEG ), but I cannot find it in Monobjc? So basically, my app needs to check if it's running as root, and if not, ask for permissions and rerun itself. Thanks!! Yvan