         statusButton?.target = self;
         statusButton?.action = "barButtonMenuPressed:"
         statusButton?.sendActionOn(Int((NSEventMask.LeftMouseDownMask | NSEventMask.RightMouseDownMask).rawValue))
+        
+        appMenu.delegate = self
     }
 
     func activateDevMode(sender: AnyObject) {

            activateDevMode(sender)
        }
        else{
            
        }
    }
}


import Appkit

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {

    @IBOutlet weak var appMenu: NSMenu!
    var statusItem:NSStatusItem?
