lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Base class for grobs and music_elements


From: Han-Wen Nienhuys
Subject: Re: Base class for grobs and music_elements
Date: Thu, 6 May 2004 00:59:04 +0200

address@hidden writes:
> > I have bad experiences with mixing C++ inheritance with GUILE smobs -
> > the interactions with virtual functions and GC are hairy, and I see
> > little added value except for collapsing a few functions. Why are you
> > so keen on changing Music ?
> 
> First of all, I made an error in my original post.  The object I
> wanted to modify was Audio_element, not Music_element.
> 
> Originally, I simply wanted to be able to have properties attached to
> Audio_elements.  More specifically, I want to be able to interact
> with Audio_elements from scheme code, much the same way as I can
> interact with grobs.  I am seeing Audio_elements as the audio
> equivalent to the visual grobs.

For the moment, I recommend to copy & paste the relevant code. When it
is working and/or there is a good reason to merge the code, we can
attach a baseclass on top of it. I know cut & paste is in bad style,
but in my experience it is more efficient to think about code sharing
after the code is written.


-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]