add deprecation message for commmandKeyBinding
This commit is contained in:
parent
cc2f80f8c1
commit
04cc031da6
3 changed files with 40 additions and 5 deletions
|
|
@ -19,11 +19,7 @@ var EventEmitter = require("../lib/event_emitter").EventEmitter;
|
|||
**/
|
||||
|
||||
var CommandManager = function(platform, commands) {
|
||||
this.platform = platform;
|
||||
this.commands = this.byName = {};
|
||||
this.commandKeyBinding = {};
|
||||
|
||||
this.addCommands(commands);
|
||||
HashHandler.call(this, commands, platform);
|
||||
|
||||
this.setDefaultHandler("exec", function(e) {
|
||||
return e.command.exec(e.editor, e.args || {});
|
||||
|
|
|
|||
|
|
@ -38,6 +38,20 @@ function HashHandler(config, platform) {
|
|||
this.platform = platform || (useragent.isMac ? "mac" : "win");
|
||||
this.commands = {};
|
||||
this.commandKeyBinding = {};
|
||||
|
||||
// todo remove this after a while
|
||||
if (this.__defineGetter__ && this.__defineSetter__ && typeof console != "undefined" && console.error) {
|
||||
this.__defineGetter__("commmandKeyBinding", function() {
|
||||
console.error("commmandKeyBinding has too many m's. use commandKeyBinding")
|
||||
return this.commandKeyBinding;
|
||||
});
|
||||
this.__defineSetter__("commmandKeyBinding", function(val) {
|
||||
console.error("commmandKeyBinding has too many m's. use commandKeyBinding")
|
||||
return this.commandKeyBinding = val;
|
||||
});
|
||||
} else {
|
||||
this.commmandKeyBinding = commandKeyBinding;
|
||||
}
|
||||
|
||||
this.addCommands(config);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue