Not sure if this is intended behaviour or not, but properties defined by
mixins do not seem to appear in the class's list_properties method.

attached is some rather useless code that demonstrates this behaviour.

Rather off topic:

I know that most (if not all) of my posts to this list are about trivial
problems I have with vala.  If I should ever get annoying, or if this
list is not the proper place to bring these issues, let me know!

Thanks,
Sam
public interface MixinWithProperty : Object
{
	public int property { get { return test_get(); } set { test_set(value); } }
	
	public abstract int test_get();
	public abstract void test_set(int value);
}

public class SomeClass : Object, MixinWithProperty
{
	int _test;

	public double some_other_property { get; set; }
	
	public int test_get() { return _test; }
	public void test_set(int value) { _test = value; }
}

void main()
{
	SomeClass sc = new SomeClass();
	
	weak ParamSpec[] params = sc.get_class().list_properties();
	
	foreach (ParamSpec p in params)
		stdout.printf("%s\n", p.name);
}

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to