I have created a new boolean context property by - adding an entry in define-context-properties.scm - setting the default in engraver-init.ly - retrieving it in a class's (Beaming_option) from_context method
However, I would like to add another context property (and modify the added one) from boolean to accepting one out of a list of symbols. Skimming the source code I couldn't really find how I achieve that. I assume that I have to define a custom predicate for my property that throws an (which?) error the argument is not in the list of accepted symbols. Is that right? And if so, where should I define that? And how do I retrieve the value of the property in a C++ class? I see this in bar-number-engraver.cc: SCM alternative_style = get_property ("alternativeNumberingStyle"); string text_tag = ""; if (scm_is_eq (alternative_style, ly_symbol2scm ("numbers-with-letters"))) But when I try to do something comparable the compiler complains: beaming-pattern.cc: In member function 'void Beaming_options::from_context(Context*)': ./include/lily-guile-macros.hh:186:65: error: 'internal_get_property' was not declared in this scope #define get_property(x) internal_get_property (ly_symbol2scm (x)) ^ beaming-pattern.cc:566:39: note: in expansion of macro 'get_property' SCM strict_beat_beaming_behaviour = get_property ("testProperty"); ^ Any pointers please? TIA Urs _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel