lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating a callback with an additional argument?


From: Marc Hohl
Subject: Re: Creating a callback with an additional argument?
Date: Sun, 26 Sep 2010 20:52:39 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100317)

Wilbert Berendsen schrieb:
Op zondag 26 september 2010 schreef Marc:

is it possible to create a callback with an additional argument?

I tried

#(define-public (my-callback string grob)
...
..
)

and wanted to call it by

\override Notehead #'stencil = #my-callback #'foo'

but lilypond complains.

You can make a function that is given the 'foo' argument and returns the callback function that expects a grob argument.

like
#(define-public (make-callback string)
...
...(lambda (grob) ...)
)

\override Notehead #'stencil = #(make-callback "foo")
That was quick - thank you!

Marc





reply via email to

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