foreach (var prop in iface.get_properties ()) {
if (prop.is_abstract || prop.is_virtual) {
- if (prop.get_accessor != null) {
+ if (prop.get_accessor != null && prop.get_accessor.readable) {
var m = prop.get_accessor.get_method ();
write_indent ();
buffer.append_printf("<field name=\"%s\"", m.name);
buffer.append_printf ("</property>\n");
}
- if (prop.get_accessor != null) {
+ if (prop.get_accessor != null && prop.get_accessor.readable) {
var m = prop.get_accessor.get_method ();
if (m != null) {
visit_method (m);
}
}
- if (prop.set_accessor != null) {
+ if (prop.set_accessor != null && prop.set_accessor.writable) {
var m = prop.set_accessor.get_method ();
if (m != null) {
visit_method (m);
m.copy_attribute_string (prop, "CCode", "array_length_type");
m.copy_attribute_bool (prop, "CCode", "array_null_terminated");
m.copy_attribute_bool (prop, "CCode", "delegate_target");
- } else if (writable) {
+ } else if (writable || construction) {
m = new Method ("set_%s".printf (prop.name), new VoidType(), source_reference, comment);
m.add_parameter (value_parameter.copy ());
}