this.$owner is null or not an object -- Help!?
I'm trying to create a button control but I get an error (this.$owner is null or not an object) when the bolded code is executed. Can someone please help explain what I'm not doing right?
Thanks,
Thanks,
Active.Templates.Button = Active.System.Control.subclass();
Active.Templates.Button.create = function() {
var obj = this.prototype;
obj.setTag("INPUT");
obj.setClass("control", "button");
// define panel data model
obj.defineModel("button");
obj.defineButtonProperty("id", "");
obj.defineButtonProperty("label", "");
obj.defineButtonProperty("tooltip", "");
obj.defineButtonProperty("disabled", false);
obj.defineButtonProperty("action", function() { } );
obj.setAttribute("type", "button");
[b]obj.setAttribute("value", function() { return this.getButtonProperty("label") } );
obj.setAttribute("title", function() { return this.getButtonProperty("tooltip") } );
obj.setAttribute("disabled", function() { return this.getButtonProperty("disabled") } );[/b]
// attach the click event function
obj.setEvent("onclick", function() { return this.getButtonProperty("action") } );
// mouse over effects
obj.setEvent("onmouseover", "mouseover(this, 'active-control-highlight')");
obj.setEvent("onmouseout", "mouseout(this, 'active-control-highlight')");
};
Active.Templates.Button.create();
Steve N
June 21,