[plt-scheme] drawing snips

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Jun 4 15:40:58 EDT 2006

At Sun, 4 Jun 2006 11:42:27 -0700, Jordan Johnson wrote:
> One other question:  I also want to maintain a little bit of data  
> about the edges connecting nodes (again, using mrlib's graph.ss);  
> basically, I have two types of edges I want to distinguish (in both  
> the model and the view).  Based on the docs and code for graph.ss, it  
> looks to me like I'm best off giving my snips their own add/remove- 
> neighbor methods and having them call add-links (and maintaining my  
> own data about link types).
> This seems a little ugly though, and in particular, since add-links  
> calls add-child and add-parent, I wonder if I should be overriding  
> them as well.  Are there other calls to these that I should beware of?

add-links is the external interface to maintain internal data structure
invariants (by calling add-parent and add-child properly). 

So, if you want to keep external information about your edges, it is
probably best to keep it in a data structure on the side and only call
add-links from one place (and in that same place, keep your parallel
edge data structure up to date).


Posted on the users mailing list.