I finally figured out how to do that by myself.
var $ = require('NodObjC')
$.import('Cocoa')
var pool = $.NSAutoreleasePool('alloc')('init'),
app = $.NSApplication('sharedApplication'),
statusMenu;
// set up the app delegate
var AppDelegate = $.NSObject.extend('AppDelegate')
AppDelegate.addMethod('applicationDidFinishLaunching:', 'v@:@', function (self, _cmd, notif) {
var systemStatusBar = $.NSStatusBar('systemStatusBar');
statusMenu = systemStatusBar('statusItemWithLength', $.NSVariableStatusItemLength);
statusMenu('retain');
var title = $.NSString('stringWithUTF8String', "Hello World");
statusMenu('setTitle', title);
})
AppDelegate.register()
var delegate = AppDelegate('alloc')('init')
app('setDelegate', delegate)
app('activateIgnoringOtherApps', true)
app('run')
pool('release');
http://masashi-k.blogspot.com/2013/07/statusbar-with-nodobjc.html