On Friday 13 Jun 2003 10:31 pm, Guillaume Laurent wrote:
> OK, I've reviewed it.

Splendid.  Then we're in complete agreement.  Or...

> - "developping out" the x,y coords from ViewElement to
> NotationElement and MatrixElement. Frankly this one appears totally
> ludicrous to me. You have the same properties in all the child
> classes, why not moving them to their common ancestor ?

Because that encourages people to do things like you were just doing: 
using the layout x/y as if they meant something.  The layout 
coordinates are only meaningful within the context of a LinedStaff 
(which knows how they map onto the canvas).  LinedStaff isn't even in 
the same namespace as the ViewElement base class.

This is the one point where having ViewElementList and Staff be a 
template class really made sense: they would allow NotationStaff to 
call getLayoutX() on a NotationElement and MatrixStaff to call 
getLayoutX() on a MatrixElement without any pretence that these meant 
the same thing.

(To be honest I don't find this point particularly distasteful in 
principle.  I probably wouldn't complain about it, except that you 
appeared to have done it _solely so that you could do something 
wrong_, namely treat the layout coordinates as if they were canvas 
coordinates.  That suggests something very bad about the practice, 
don't you think?)

> - insisting on the ControlRuler being a Segment observer rather
> than a ViewElementList observer. I thought we had agreed this
> wasn't the right way to go.

??

You posted an email about it.  I don't think I replied at the time.

> As you do it, we have to rely on the
> time when the observers are called (which is bound to come back and
> bite us later on), and we have this silly schizophrenic behavior
> going like "gee I have that element here, now I'll waste time to
> look up its ViewElement which I created like two cycles ago".
> Frankly if you call my design "ugly" I don't know how to call that.

You have a point here though.  I'm not happy with my version here 
either.  (Tangent: when you first implemented this, the 
SegmentObservers really couldn't be relied on to be called in a 
particular order.  I changed that, following your lead with the 
ViewElementListObservers, by making the ObserverSet a list instead of 
a set -- that way the order is guaranteed.  Of course a list is 
better anyway for performance reasons, and a vector might be better 
still.)  However, I do think (as I said in another email) that you 
want StaffObservers rather than ViewElementListObservers.

> I really don't understand what you find wrong with the idea of a
> ViewElementList observer.

Well actually, I was thinking about it this morning and I wasn't sure 
we needed two separate classes for ViewElementList and Staff at all.  
Why not just Staff as subclass of both multiset and SegmentObserver?  
This is also a logical conclusion of the comment I added at 
Staff.C:85 when fixing that bug yesterday.  What am I missing?

The ViewElementList is a funny class, it's gradually become 
marginalised to the point where it doesn't actually do anything other 
than be a container and receive delegations from Staff.


Chris



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to