Auar / flexvizgraphlib

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

Error on linked 2 already linked node #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. link 2 node already linked, but reverse the order of the node then you
call VisualGraph::linkNodes(node1, node2)
then call
VisualGraph::linkNodes(node2, node1)

What is the expected output? What do you see instead?
- Doing nothing and get the already connected edge if non directionnal.
- I don't know what it must do on directionnal graph ? Because you cannot
add another link, you have to choice between throw an error, change
direction or do nothing.

What version of the product are you using? On what operating system?
Last subversion from 28 february 2008

Please provide any additional information below.
For my project to work I did change a line in the method Graph::link(node1,
node2,o);
on line 248 I did this change:
----
if(edge.node2 == node2 || edge.node1 == node2) {
----

So it test both end of the edge. And it works for me.

Original issue reported on code.google.com by christop...@altares.fr on 29 Feb 2008 at 3:50

GoogleCodeExporter commented 9 years ago
I forgot to give you the trace:
Error: We did not find the edge although it should be there
    at org.un.flex.graphLayout.data::Graph/link()[C:\Newsys\ws
flex\graphLayout\org\un\flex\graphLayout\data\Graph.as:434]
    at org.un.flex.graphLayout.visual::VisualGraph/linkNodes()[C:\Newsys\ws
flex\graphLayout\org\un\flex\graphLayout\visual\VisualGraph.as:969]
    at
fr.altares.newsys.viper.assemblage.organizationDetail.classes::LinkedOrganizatio
nsNodeItem/addItem()[C:\Newsys\ws
flex\viperLibrary\src\fr\altares\newsys\viper\assemblage\organizationDetail\clas
ses\LinkedOrganizationsNodeItem.as:69]
    at
fr.altares.newsys.viper.assemblage.organizationDetail.classes::LinkedOrganizatio
nsNodeItem/resultHandler()[C:\Newsys\ws
flex\viperLibrary\src\fr\altares\newsys\viper\assemblage\organizationDetail\clas
ses\LinkedOrganizationsNodeItem.as:49]
    at
fr.altares.newsys.services.remoteObject::BaseService/httpOperationResult()[C:\Ne
wsys\ws
flex\viperLibrary\src\fr\altares\newsys\services\remoteObject\BaseService.as:97]
    at fr.altares.newsys.services.remoteObject::Responder/result()[C:\Newsys\ws
flex\viperLibrary\src\fr\altares\newsys\services\remoteObject\Responder.as:19]
    at
mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[E:\
dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AsyncToken.as:204]
    at
mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callToken
Responders()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\events\R
esultEvent.as:166]
    at
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRp
cEvent()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractOper
ation.as:191]
    at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandle
r()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.a
s:198]
    at
mx.rpc::Responder/result()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\m
x\rpc\Responder.as:48]
    at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_3_beta3\sdk\frameworks\projects\r
pc\src\mx\rpc\AsyncRequest.as:81]
    at
NetConnectionMessageResponder/resultHandler()[E:\dev\flex_3_beta3\sdk\frameworks
\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:477]
    at
mx.messaging::MessageResponder/result()[E:\dev\flex_3_beta3\sdk\frameworks\proje
cts\rpc\src\mx\messaging\MessageResponder.as:206]

Original comment by christop...@altares.fr on 29 Feb 2008 at 3:52

GoogleCodeExporter commented 9 years ago
Thanks. Indeed the first found edge could be oriented the other way round. 
I implemented the patch, but differently. Since this issue came up before, the 
Edge
class has now a method called othernode(), which always returns the other end 
of the
edge than the one specifies as argument. So the code now looks like this:

if(edge.othernode(node1) == node2) {
    retEdge = edge;
    break;
}

Which should work. It is committed to SVN. Could you please verify?

Thanks,
 Daniel

Original comment by spo...@gmail.com on 21 Mar 2008 at 4:21