rem: function compare (a, b) { if (a.name == b.name) return 0; else if (a.name > b.name) return 1; else return -1; } 
add: var parentElem = document.getElementById(parent); if (!ASSERT(parentElem, "setKey: couldn't get parent '" + parent + "' for " + command.name)) return;  var ary = keystr.match (/(.*\s)?([\S]+)$/); var key = document.createElement ("key"); key.setAttribute ("id", "key:" + command.name); key.setAttribute ("oncommand", "dispatch('" + command.name + "');"); key.setAttribute ("modifiers", ary[1]); if (ary[2].indexOf("VK_") == 0) key.setAttribute ("keycode", ary[2]); else key.setAttribute ("key", ary[2]); 
context: function cmgr_add (name, func, usage, help){    function compare (a, b)    {        if (a.name == b.name)            return 0;        else            if (a.name > b.name)                return 1;            else                return -1;    }        this.commands.push ({name: name, func: func, usage: usage, help: help});    this.commands = this.commands.sort(compare);    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/89326cbcdc6feb4eef3ffc00bb488c9640e8dd81/command-manager.js/buggy/extensions/venkman/resources/content/command-manager.js