linking two node using: vgraph.linkNodes(... ...) function

16 views
Skip to first unread message

Pradeep.Chahal

unread,
Oct 31, 2009, 9:31:19 PM10/31/09
to BirdEye

Hello,

I am using EnhancedGraph lib, I dowloaded source code from
http://birdeye.googlecode.com/svn/trunk/ravis/libRaVis

After initializing graph with xml file, i am able to see graph in gui.

nand when I add node through function by creating node and linking two
node, I get error in function draw(vedge:IVisualEdge) of EdgeDrawer
class. in this function, there is statement var edgeVO:Object =
edge.data;

here edge.data is null.

I am linking two node by this function. I am not undersatnding where
should I set the data property for the edge vgraph.linkNodes function
don't take third parameter, before returning of this function i get
error, so even I don't have option to set edge data property after
linking two node.



public function addNodeVo(obj:Object):Boolean{
var iVNode:IVisualNode = vgraph.createVNodeFromVO
(obj.id, obj);
var fromNode:INode = graph.nodeByStringId("1");
var newEdge:IVisualEdge = vgraph.linkNodes
(fromNode.vnode,iVNode); // here is the probelm

var obEdge:Object = new Object();
vgraph.currentRootVNode=fromNode.vnode;
vgraph.maxVisibleDistance=vgraph.maxVisibleDistance
+1;
vgraph.draw();
return true;
}

Pradeep Kr Chahal

commonwealth games 2010
http://www.commonwealth-india.com/
Reply all
Reply to author
Forward
0 new messages