Authentic.attachCallBack

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  User Reference > Objects > Authentic >

Authentic.attachCallBack

Deprecated

 

Use connection point events instead as described here.

 

 

See also

 

Declaration: attachCallBack(bstrName as String,varCallBack as Variant)

 

Description

The Authentic View provides events which can be handled using custom callback functions. All event handlers take no parameters and any returned value will be ignored. To retrieve information when a specific event is raised you have to read the according properties of the event object.

 

List of currently available events:

 

 ondragover

 ondrop        

 onkeydown

 onkeyup

 onkeypressed

 onmousemove

 onbuttonup

 onbuttondown

 oneditpaste

 oneditcut

 oneditcopy

 

Since version 3.0.0.0:

 

 ondoceditcommand

 

Since version: 5.3.0.0:

 

 onbuttondoubleclick

 

 

JavaScript example:

 

 // somwhere in your script:

 objPlugIn.attachCallBack("ondragover",OnDragOver);

 objPlugIn.attachCallBack("ondrop",OnDrop);

 

 // event handlers

 function OnDragOver()

 {

         if(        !objPlugIn.event.dataTransfer.ownDrag &&

                 objPlugIn.event.dataTransfer.type == "TEXT"))

         {

                 objPlugIn.event.dataTransfer.dropEffect = 1;

                 objPlugIn.event.cancelBubble = true;

         }

 }

 

 // OnDrop() replaces the complete text value of the XML

 // element with the selection from the drag operation

 function OnDrop()

 {

         var objTransfer = objPlugIn.event.dataTransfer;

 

         if(        !objTransfer.ownDrag &&

                 (objTransfer.type == "TEXT"))

                 objPlugIn.event.srcElement.TextValue = objTransfer.getData();

 }

 


© 2019 Altova GmbH