--------------EB0824A994C62E9055B99731
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello.
Thanks for your help.
Actually I wanted to reduce the complexity of this to O(1) , since search is
O(log N).
Well I've found another way of doing it , in the cost of changing a GUI a bit
:
now if you want to draw an edge you click on the source vertex ( regular click
with release)
move pointer to the destination , pointer followed by the edge , and click on
it.
This is the same model as in XFig for example.
I've done it by tracking enter and leave events for each vertex , this way i
know when and which vertex entered
and if button was clicked in it.
I'm sorry i can't post the code , its in very early development stage ,
if you want it anyway email me.
Regards
Philip
Hever Zsolt wrote:
> This is not a direct answer, but hopefully it is a help.
> I am working on a bit similar program and I have put out some code.
> http://www.nexus.hu/hever/prog/vu/visualut.py <=main program
> http://www.nexus.hu/hever/prog/vu/frameobj.py <= module
> http://www.nexus.hu/hever/prog/vu/vu.gif <= help, a picture of the
> program
> It grew out from the same script(s) you mentioned, there are same problems
> you have now that I had to solve somehow.
> In the frameobj.py module there is a "class Connecting_Objects:" which does
> that. I maintain an ordered taglist for additional information.
>
> Zsolt
>
--------------EB0824A994C62E9055B99731
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
Hello.
<P>Thanks for your help.
<P>Actually I wanted to reduce the complexity of this to O(1) , since search
is O(log N).
<BR>Well I've found another way of doing it , in the cost of changing a
GUI a bit :
<BR>now if you want to draw an edge you click on the source vertex ( regular
click with release)
<BR>move pointer to the destination , pointer followed by the edge , and
click on it.
<BR>This is the same model as in XFig for example.
<BR>I've done it by tracking enter and leave events for each vertex , this
way i know when and which vertex entered
<BR>and if button was clicked in it.
<BR>I'm sorry i can't post the code , its in very early development stage
,
<BR>if you want it anyway email me.
<P>Regards
<BR>Philip
<P>Hever Zsolt wrote:
<BLOCKQUOTE TYPE=CITE>This is not a direct answer, but hopefully
it is a help.
<BR>I am working on a bit similar program and I have put out some code.
<BR><A HREF="
http://www.nexus.hu/hever/prog/vu/visualut.py">
http://www.nexus.hu/hever/prog/vu/visualut.py</A>
<=main program
<BR><A HREF="
http://www.nexus.hu/hever/prog/vu/frameobj.py">
http://www.nexus.hu/hever/prog/vu/frameobj.py</A>
<= module
<BR><A HREF="
http://www.nexus.hu/hever/prog/vu/vu.gif">
http://www.nexus.hu/hever/prog/vu/vu.gif</A>
<= help, a picture of the
<BR>program
<BR>It grew out from the same script(s) you mentioned, there are same problems
<BR>you have now that I had to solve somehow.
<BR>In the frameobj.py module there is a "class Connecting_Objects:" which
does
<BR>that. I maintain an ordered taglist for additional information.
<P>Zsolt
<BR><A HREF="
http://www.python.org/mailman/listinfo/python-list"></A> </BLOCKQUOTE>
</HTML>
--------------EB0824A994C62E9055B99731--