jell0720 / birdeye

Automatically exported from code.google.com/p/birdeye
0 stars 0 forks source link

Can not link nodes in vgraph #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
== What steps will reproduce the problem? ==

For me, the following two lines do not work:
vgraph.unlinkNodes(selectedNode.inEdges[0].node1.vnode, selectedNode.vnode);
vgraph.linkNodes(vgraph.currentRootVNode, selectedNode.vnode);

ActionScript throws an error, which I have included at the bottom of the bug 
report.  I have reproduced this in multiple projects, and have included a 
modified demo project to reproduce this behavior.
1. Select a node other than the root node by using the keyboard
2. Click the "Change Parent" button at the bottom.  An error should occur.

== What is the expected output? What do you see instead? ==

I would expect that a new edge would be created (and rendered, given a 
vgraph.draw() call) linking the root node to the selected node.

== What version of the product are you using? On what operating system? ==

I am using revision 1828 of Ravis in Flex 3.5.

== Please provide any additional information below. ==

It appears the data for the newly created Edge is never set before the edge is 
rendered.  I have included the full stack trace below:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
    at org.un.cava.birdeye.ravis.enhancedGraphLayout.visual.edgeRenderers::EdgeRenderer/set data()[/Users/bschoenberg/code/designer/libravis/org/un/cava/birdeye/ravis/enhancedGraphLayout/visual/edgeRenderers/EdgeRenderer.as:316]
    at org.un.cava.birdeye.ravis.graphLayout.visual::VisualGraph/createVEdgeLabelView()[/Users/bschoenberg/code/designer/libravis/org/un/cava/birdeye/ravis/graphLayout/visual/VisualGraph.as:1911]
    at org.un.cava.birdeye.ravis.enhancedGraphLayout.visual::EnhancedVisualGraph/createVEdgeLabelView()[/Users/bschoenberg/code/designer/libravis/org/un/cava/birdeye/ravis/enhancedGraphLayout/visual/EnhancedVisualGraph.as:363]
    at org.un.cava.birdeye.ravis.graphLayout.visual::VisualGraph/setEdgeVisibility()[/Users/bschoenberg/code/designer/libravis/org/un/cava/birdeye/ravis/graphLayout/visual/VisualGraph.as:2733]
    at org.un.cava.birdeye.ravis.enhancedGraphLayout.visual::EnhancedVisualGraph/createVEdge()[/Users/bschoenberg/code/designer/libravis/org/un/cava/birdeye/ravis/enhancedGraphLayout/visual/EnhancedVisualGraph.as:305]
    at org.un.cava.birdeye.ravis.graphLayout.visual::VisualGraph/linkNodes()[/Users/bschoenberg/code/designer/libravis/org/un/cava/birdeye/ravis/graphLayout/visual/VisualGraph.as:1170]
    at ViseoTypeGraph/changeParent()[C:\svn\cg\cgmg3ais\Samples\ViseoTypeGraph\src\ViseoTypeGraph.mxml:75]
    at ViseoTypeGraph/___ViseoTypeGraph_Button2_click()[C:\svn\cg\cgmg3ais\Samples\ViseoTypeGraph\src\ViseoTypeGraph.mxml:32]

Original issue reported on code.google.com by monkiew...@gmail.com on 21 Mar 2011 at 5:42

GoogleCodeExporter commented 9 years ago
I forgot to attach the demo project with the original post

Original comment by monkiew...@gmail.com on 21 Mar 2011 at 7:14

Attachments: