Is there a prefered method of assigning event listeners when creating
widgets? I have looked through the code for the gui components and they seem
to use either

First way :-

function Widget() {
 this.DynLayer = DynLayer;
 this.DynLayer();

 var listener = new EventListener(this);

 this.addEventListener(listener);
};
Widget.prototype = new DynLayer;

or Second way :-

function Widget() {
 this.DynLayer = DynLayer;
 this.DynLayer();
 this.addEventListener(Widget.Listener);
};
Widget.prototype = new DynLayer;
Widget.Listener = new EventListener();

is there a reason one is used over the other in some situations?






_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to