[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hid
From: |
Paul Morris |
Subject: |
Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden) |
Date: |
Mon, 16 Feb 2015 09:04:00 -0700 (MST) |
David Nalesnik-2 wrote
> On 2015/02/16 07:56:10, dak wrote:
>> "Needing to determine the name of a grob" should actually rarely be
>> necessary:
>> the pervasive information connected to the functionality of a grob is
>> rather its
>> interfaces. That's the usual criterion for deciding whether to deal with
>> a
>> particular grob. Relaying on the name makes it harder to create variants
>> of
>> existing grobs.
>
> I see what you are saying. I'm aware that grob recognition takes place
> through interfaces, and that the user could use grob::has-interface.
Hmmm... would it be a good idea to also have a ly:grob-has-interface scheme
function? That would make it just as easy to use interfaces for identifying
grobs as it would be to use grob names (with ly:grob-name). And that would
help encourage the use of the "interfaces" approach.
Looks like currently one would have to use the following and then check the
list for a particular interface:
Function: ly:grob-interfaces grob
Return the interfaces list of grob grob.
Cheers,
-Paul
P.S. FWIW, here's one marginal use case. I've been using grob names to
differentiate key signature grobs from key cancellation grobs, within a
custom engraver that acknowledges the key-signature-interface. I could add
a second engraver for the key-cancellation-interface to deal with key
cancellation grobs, but since both key signatures and key cancellations have
the key-signature-interface, I would still need a way to differentiate
between them in the engraver that acknowledges the key-signature-interface.
Either ly:grob-name or (better yet) ly:grob-has-interface would be helpful
to have for this kind of thing.
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Make-Grob-name-accessible-to-Scheme-issue-203090043-by-david-nalesnik-gmail-com-tp171933p171957.html
Sent from the Dev mailing list archive at Nabble.com.
- Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), david . nalesnik, 2015/02/15
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), dak, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), david . nalesnik, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden),
Paul Morris <=
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Kastrup, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), Paul Morris, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Kastrup, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Nalesnik, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Kastrup, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Nalesnik, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), Paul Morris, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Nalesnik, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), Paul Morris, 2015/02/16
- Re: Make Grob::name accessible to Scheme (issue 203090043 by address@hidden), David Nalesnik, 2015/02/16