Re: [frogs] Stepping into the code for nested properties

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]




On 5/11/10 2:11 AM, "Rodolfo Zitellini" <xhero.gm@xxxxxxxxx> wrote:

> Ok here I am with my first round of questions.
> If I understand correctly, an object's properties are represented by
> an alist of pairs in the form (property-name . value), and "value" can
> be another alist (for nested properties)
> Now, when you call execute_override_property (in context-property.cc)
> you get the alist with all the properties and change the relevant one,
> but... how is the list of the properties created in the first place?
> where do the default values come from?

IIUC, the default values are part of the *context* properties, rather than
part of the *grob* properties.  If there is no grob property list, then the
value of the properties is determined from the defaults in the context.

Also, IIUC, when you call execute_override_property, you don't *replace* the
override, you *prepend* it.  Or at least, that's what happens for non-nested
properties.  It's possible that that *doesn't* happen for nested properties,
and may be the cause of some of the nested-property bugs.

> I ask because when you do a \revert and you did not do any \override
> before in the same grob execute_revert_property simply does nothing
> and returns, but if the \override was done, in the case of a nested
> property the one you are reverting simply gets removed from the alist
> (the code in nested_property_revert_alist(91) is quite explicit too:
> /* old value is dropped. */). I assume this is the problem, did I
> understand right here?

I think so.

Thanks,

Carl


---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/