Hi all,
I can't figure out why the alertDraggable function does have access to the this variable (refering to the object instance), and the onClick function (invoked from within the VE API) doesn't. I appreciate your advise.
Note: the code uses the inheritance model as described at: http://twologic.com/projects/inheritance/Code:ULAB.GeoCMS.Core.Shape = Class.extend({ initialize: function(type, points) { this.veShape = new VEShape(type, points); this.locked = true; this.previousLocation = null; this.draggable = true; this.core = ULAB.GeoCMS.Core.Register.getEntry('core'); this.map = core.getMap(); this.map.AttachEvent("onclick", this.onClick); }, alertDraggable: function() { alert(this.draggable); //true }, onClick: function() { alert(this.draggable); //undefined });
Thanks in advance!





Bookmarks