lilypond-user
[Top][All Lists]
Advanced

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

Re: checking grob type


From: David Nalesnik
Subject: Re: checking grob type
Date: Fri, 17 Mar 2017 08:42:55 -0500

On Fri, Mar 17, 2017 at 8:38 AM, David Nalesnik
<address@hidden> wrote:
> Hi,
>
> On Fri, Mar 17, 2017 at 7:18 AM, Urs Liska <address@hidden> wrote:
>> Hi Paul,
>>
>>
>> Am 17.03.2017 um 13:12 schrieb Paul:
>>> On 03/17/2017 07:37 AM, Urs Liska wrote:
>>>
>>>> I order to check arguments for its type I've written this shorthand
>>>> function:
>>>>
>>>> #(define (grob-type? grob name)
>>>>     (eq? name (assq-ref (ly:grob-property grob 'meta) 'name)))
>>>>
>>>> which of course does what it's supposed to. But I wonder if there's a
>>>> more straightforward way, e.g. a built-in function doing the same?
>>>
>>> (ly:grob-name some-grob)
>>
>> Thanks, this was exactly the thing I was sure is available :-)
>>
>>>
>>> Also:
>>>
>>> (grob::has-interface some-grob some-interface)
>>>
>>> See:
>>> http://lilypond.1069038.n5.nabble.com/Make-Grob-name-accessible-to-Scheme-issue-203090043-by-david-nalesnik-gmail-com-td171933.html
>>>
>>>
>>> (Would be better if we had better docs for scheme functions...)
>>
>> Hm ...
>>
>> Best
>> Urs
>>
>
> You can get more info about public functions with the attached file.
> I was planning on getting documentation into the manuals somehow, but
> I got hung up with getting the parameters of curried functions.
>
> Also, of course, publicizing a number of these probably won't do
> anybody a bit of good.

It also reveals some omissions...

grob::has-interface
#<procedure grob::has-interface (grob iface)>
   "DOCME"

-DN



reply via email to

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