[Clam-devel] Request for votes: Thinking on 'Connect to' feature

Pau Arumí parumi at iua.upf.edu
Thu Jun 19 15:09:09 PDT 2008


On dj, 2008-06-19 at 16:12 -0300, Natanael Olaiz wrote:
> > I'm reading the onAddLinkedProcessing() code and I don't understand
> > why/if it works. It seems to me that it is trying to add a new linked
> > processing to all existing processings.
> > I guess the trick is in the delegated method
> > (addLinkedProcessingSender/Receiver): 
> > unsigned portIndex = processing->portIndexByYPos(point);
> > this might return an invalid port index. But I miss the conditional code
> > that avoids adding a processing box on invalid cases.
> >
> > I think that is David code. A clue, anyone? (I'm lazy to debug right
> > now)
> >   
> onAddLinkedProcessing() checks for ProcessingBox::inportsRegion or 
> ProcessingBox::outportsRegion to call 
> addLinkedProcessingSender/Receiver, so portIndexByYPos gives the index 
> of that port, which is on the passed ProcessingBox *.

aha! now i get it, the switch(region) refers to what kind of region it is "in respect of the current processing in the iteration". so only in one processing will match an port region.

> > Yes, keep commiting your local changes, and refactoring where you see
> > the opportunity.
> >   
> 
> OK. But, this patch too? It's not buggy, but ugly and unoptimized...

Yes, it is preferable often commits, unless the change set is very
experimental. This way is much easier to program concurrently, and you
have a resort to go back (or compare) to last stable point.

P





More information about the clam-devel mailing list