Properties



Hello,

I have another question.

I know you can make properties in python accessible as fields (as opposed to accessing via obj.props.$property) by using the @Property decorator. Is the same somehow possible for introspected classes?

For example I have this (in vala):

class T : GLib.Object
{
     public int a { get { return 1; } }
}

GI allows me to use that class (obj = T()), but the property is only accessible via obj.props.a, where I would prefer obj.a directly.

Do I have to do anything special to the .gir or .typelib, or when importing it into the python code? Or this not possible at all?

Best regards.


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