mooRainbow 1.2b(http://moorainbow.woolly-sheep.net/)をmootools 1.4.4で動作させようとしていますが、答えが見つからないようなエラーが発生しました。
このセクションでエラーがスローされます...
OverlayEvents: function ()
{
var lim, curH, curW, inputs;
curH = this.snippet('curSize', 'int').h;
curW = this.snippet('curSize', 'int').w;
// $A is deprecated, the original line here was:
// inputs = $A(this.arrRGB).concat(this.arrHSB, this.hexInput);
inputs = this.arrRGB.concat(this.arrHSB, this.hexInput);
document.addEvent('click', function ()
{
if (this.visible) this.hide(this.layout);
}.bind(this));
inputs.each(function (el)
{
// this is where the error is thrown
el.addEvent('keydown', this.eventKeydown.bindWithEvent(this, el));
el.addEvent('keyup', this.eventKeyup.bindWithEvent(this, el));
}, this);
[this.element, this.layout].each(function (el)
{
el.addEvents({
'click': function (e) { new Event(e).stop(); },
'keyup': function (e)
{
e = new Event(e);
if (e.key == 'esc' && this.visible) this.hide(this.layout);
}.bind(this)
}, this);
}, this);
これがスローされたエラーです...
Uncaught TypeError: Object function (){
if (method.$protected && this.$caller == null)
throw new Error('The method "' + key + '" cannot be called.');
var caller = this.caller, current = this.$caller;
this.caller = current; this.$caller = wrapper;
var result = method.apply(this, arguments);
this.$caller = current; this.caller = caller;
return result;
} has no method 'bindWithEvent'
PS。問題はここのMooTools/JS:bindWithEventに似ているようですが、そこにある答えは私のコンテキストとは無関係であり、同じ問題であるかどうかはわかりません。