lilypond-user
[Top][All Lists]
Advanced

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

Re: getting a TextSpanner 'text


From: Graham Percival
Subject: Re: getting a TextSpanner 'text
Date: Fri, 15 Apr 2011 09:12:49 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Apr 14, 2011 at 09:25:32AM -0600, Carl Sorensen wrote:
> 
> On 4/14/11 1:47 AM, "Graham Percival" <address@hidden> wrote:
> 
> > produces the following (with linebreaks and indents added).  I'm
> > really confused about the multiple "bound-details", the multiple
> > "left/right" inside each bound-details, etc.  How can I make sure I
> > get the bound-details that I want, without using plain old (car ...) ?
> 
> The correct bound-details is the first one (overrides are prepended; the old
> values are not removed).
> 
> The proper way to do it is something like
> 
> (let* ((spanner-props (ly:context-property context 'TextSpanner))
>        (details (assoc-get 'bound-details spanner-props '()))

huh, I had no idea how alists worked.

I finally went and skimmed the Extending manual, and discovered
chain-assoc-get.  The above code doesn't work (it returns the
wrong set of 'bound-details), but it works with chain-assoc-get.

Thanks for pointing me in the right direction, Carl!

Cheers,
- Graham



reply via email to

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