lilypond-devel
[Top][All Lists]
Advanced

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

Re: cleanup: infinity, get property (issue 6310043)


From: Janek Warchoł
Subject: Re: cleanup: infinity, get property (issue 6310043)
Date: Fri, 15 Jun 2012 16:51:41 +0200

I forgot that my git-cl is configured to add -devel to cc!
This is a draft which i was discussing with Mike, but since it got
public, i welcome any comments!

On 2012/06/15 09:42:03, dak wrote:
> On 2012/06/15 09:22:28, janek wrote:
> > How do you like this?
> >
> > I've tried to define a new property lyricDefaultAlignment (similar to
> > lyricMelismaAlignment) and use it in line 47, but i got an error:
> > 'internal_get_property' was not declared in this scope
> >
> > I'll investigate when i get back home.
>
> What makes you think Lyric_text has properties?  It is a class you defined
> yourself.
>
> I really can't figure out what you are trying to do here.

I'm trying to define a new context property lyricDefaultAlignment
similarly to how lyricMelismaAlignment is defined.
(did i use the right name? lyricMelismaAlignment is a context
property, i.e. a property that doesn't belong to a specific grob?)
Look at Lyric_engraver, lines 76-77:

last_text_->set_property ("self-alignment-X",
                                      get_property ("lyricMelismaAlignment"));

unless i'm totally wrong, last_text_ is a pointer to a LyricText item.
 These two lines set that LyricText's self-alignment-X to what is
inside lyricMelismaAlignment.  I want to do something similar: in
Lyric_text, i have a pointer to LyricText item and i want to set its
self-alignment to what's inside another property:
lyricDefaultAlignment.

> What makes you think Lyric_text has properties?

Does it need any?  I'm trying to read a context property (or at least
that's what i think i'm trying), i thought that they don't need to be
"owned".

> It is a class you defined yourself.

I've looked at other class definitions (in particular, flag.cc) and
tried to define Lyric_text accordingly to what i saw.  Apparently i
missed something, but i don't know what :(
I thought that ADD_INTERFACE is responsible for connecting my class
with the rest of the code, and MAKE_SCHEME_CALLBACK makes a method
available in Scheme "layer".  I don't have any idea what else is
necessary...
I'd be grateful for an explanation.

thanks,
Janek



reply via email to

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