bug-lilypond
[Top][All Lists]
Advanced

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

Re: Something wrong/strange about flags?


From: Thomas Morley
Subject: Re: Something wrong/strange about flags?
Date: Mon, 26 Dec 2011 00:43:14 +0100

2011/12/26 Neil Puttock <address@hidden>:
>
> On 25 Dec 2011 23:01, "Thomas Morley" <address@hidden> wrote:
>
>> I think there could be some difficulties to find the correct
>> condition, when I create my own definitions/functions:
>>
>> \version "2.15.20"
>>
>> displayGrob =
>>       \once\override Stem #'after-line-breaking =
>>       #(lambda (grob)
>>         (let* ((beam (ly:grob-object grob 'beam))
>>                (flag (ly:grob-object grob 'flag)))
>>
>>         (begin
>>           (if (ly:grob? beam)
>>               (display "Yes")
>>               (display "No"))
>>           (newline)
>>           (if (ly:grob? flag)
>>               (display "Yes")
>>               (display "No"))
>>           (newline))))
>>
>> { \displayGrob c'8[ d'] }
>>
>> I retrieve "Yes" in both cases.
>
> Filter out suicided grobs via grob::is-live?
>
> Cheers,
> Neil

Just for the record. This works as expected:

\version "2.15.20"

displayGrob =
      \once\override Stem #'after-line-breaking =
      #(lambda (grob)
        (let* ((beam (ly:grob-object grob 'beam))
               (flag? (grob::is-live? (ly:grob-object grob 'flag))))

        (begin
          (if (ly:grob? beam)
              (display "Yes")
              (display "No"))
          (newline)
          (display flag?))))

{ \displayGrob c'8[ d'] }


So it's no bug!


Many thanks,
  Harm



reply via email to

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