                     action: Selector(item["action"] as String),
                     keyEquivalent: item["key"] as String)
                 menuItem.target = self
+                menuItem.tag = item["tag"] as? Int ?? 0
             }
             self.addItem(menuItem)
         }

import Cocoa
import Foundation

class FTSActionMenu: NSMenu {

    var params : [String : AnyObject]!
    var task : FTSTask!
    
    let items = [
        ["title": "Start",              "action": "start:",            "key": ""],
        //["title": "Stop",               "action": "stop:",             "key": ""],
        ["title": "Open with Terminal", "action": "openWithTerminal:", "key": ""],
        ["title": "Open with Finder",   "action": "openWithFinder:",   "key": ""],
        ["separator": true],

    private func initMenuItems() {
        for item in self.items {
            var menuItem : NSMenuItem!
            if ( item["separator"] as? Bool == true ) {
                menuItem = NSMenuItem.separatorItem()
            }
            else {
