Le 08/08/2021 18:34, Lukas-Fabian Moser <l...@gmx.de> a écrit :
Hi,
sorry for the messed-up formatting. I try again:
This is probably a very stupid question.
During my work on updating blackmensural.ly I had to deal with customgrob and context properties. The original source for 2.12 did the following:
%% ===============================================% declaring some custom properties%% ===============================================
%% custom NoteHead property, for \override-able notehead style definitions#(set-object-property! 'mensural_glyphs 'backend-type? list?)#(set-object-property! 'mensural_glyphs 'backend-doc "current set ofmensural display settings")
%% custom Voice context property, needed for ligature assembly#(set-object-property! 'mensural_ligature_queue 'backend-type? list?)#(set-object-property! 'mensural_ligature_queue 'backend-doc "currentset of note grobs to be assembled into a ligature")#(set-object-property! 'mensural_accidentals_queue 'backend-type? list?)#(set-object-property! 'mensural_accidentals_queue 'backend-doc "currentset of accidentals to be collected for a ligature")
%% custom entry in an event's 'tweak property#(set-object-property! 'mensural_tags 'backend-type? list?)#(set-object-property! 'mensural_tags 'backend-doc "various tags set ina notehead tweak to control mensural note display")
The actual code then accessed
a) mensural_glyphs with what amounts to \overrideNoteHead.mensural_glyphs = ...b) mensural_ligature_queue with (ly:context-property some-context'mensural_ligature_queue) and (what amounts to) \setmensural_ligature_queue = ...c) mensural_tags with (ly:grob-property some-note 'mensural_tags) (andin a tweak).
Part b) failed with current LilyPond: "can't find property type-checkfor `instrument' (translation-type?)" (I'm not sure if a) and c) work orjust were not being in an active code path).
Now, looking at scm/define-context-properties.scm andscm/define-grob-properties.scm that there seems to be a distinction:
- Context properties (\set'table) are defined via (set-object-property!symbol 'translation-type? type?)- Grob properties (\override'able) are defined via (set-object-property!symbol 'backend-type? type?)
Is this correct?
To my knowledge, yes.
And if so, when did this change between 2.12 and 2.22,seeing as the above code seems to have worked in 2011?
No idea, sorry.
Best,
Jean
It works fine in2.22 if I define mensural_ligature_queue using 'translation-type?
Lukas