harmomelodic
8 Oct 2010, 8:06 AM
I've created a user extension for ToolTip that makes 'delegate' a function...this allows me to ask an embedded document for an object containing information regarding where, when, and with what content to display the tooltip.
When I attach a listener and try to update the body with this information, it tells me there is no body!!! Of course update fails for the same reason...
why in the world would body fail to be set???
Ext.ux.SVGToolTip = Ext.extend(Ext.ToolTip, {
onMouseMove : function(e) {
var t = this.delegate ? this.delegate(replace_e_for_embed(e)) : this.triggerElement = true;
if (t) {
this.targetXY = e.getXY();
if (t.CheckPointEquality(this.triggerElement)) {
if(!this.hidden && this.trackMouse){
this.setPagePosition(this.getTargetXY());
}
} else {
this.hide();
this.lastActive = new Date(0);
this.onTargetOver(e);
}
} else if (!this.closable && this.isVisible()) {
this.hide();
}
}
, onTargetOver : function(e) {
if(this.disabled || e.within(this.target.dom, true)){
return;
}
var t = this.delegate ? this.delegate(replace_e_for_embed(e)) : e.getTarget();
if (t) {
this.triggerElement = t;
this.clearTimer('hide');
this.targetXY = e.getXY();
this.delayShow();
}
}
});
tooltip = new Ext.ux.SVGToolTip({
target: 'mask'
, html: 'fillerblahblahblahblahblahblahblahblahblahblahblahblah'
, dismissDelay: 0
, hideDealy: 0
, showDelay: 0
, delegate: svgdoc.GetTargetPoint
, listeners: {
beforeshow: function updateTipBody(tip) {
tip.update(tip.triggerElement.blah);//FAILS!!!!!!!!!!!!!!!!!
}
}
});
When I attach a listener and try to update the body with this information, it tells me there is no body!!! Of course update fails for the same reason...
why in the world would body fail to be set???
Ext.ux.SVGToolTip = Ext.extend(Ext.ToolTip, {
onMouseMove : function(e) {
var t = this.delegate ? this.delegate(replace_e_for_embed(e)) : this.triggerElement = true;
if (t) {
this.targetXY = e.getXY();
if (t.CheckPointEquality(this.triggerElement)) {
if(!this.hidden && this.trackMouse){
this.setPagePosition(this.getTargetXY());
}
} else {
this.hide();
this.lastActive = new Date(0);
this.onTargetOver(e);
}
} else if (!this.closable && this.isVisible()) {
this.hide();
}
}
, onTargetOver : function(e) {
if(this.disabled || e.within(this.target.dom, true)){
return;
}
var t = this.delegate ? this.delegate(replace_e_for_embed(e)) : e.getTarget();
if (t) {
this.triggerElement = t;
this.clearTimer('hide');
this.targetXY = e.getXY();
this.delayShow();
}
}
});
tooltip = new Ext.ux.SVGToolTip({
target: 'mask'
, html: 'fillerblahblahblahblahblahblahblahblahblahblahblahblah'
, dismissDelay: 0
, hideDealy: 0
, showDelay: 0
, delegate: svgdoc.GetTargetPoint
, listeners: {
beforeshow: function updateTipBody(tip) {
tip.update(tip.triggerElement.blah);//FAILS!!!!!!!!!!!!!!!!!
}
}
});