Re: [Vala] Properties == GObject properties?
- From: Tal Hadad <tal_hd hotmail com>
- To: Vala Mail List <vala-list gnome org>
- Subject: Re: [Vala] Properties == GObject properties?
- Date: Fri, 11 Oct 2013 10:34:17 +0300
First time I hear not all properties are GObject.
Suppose I have this property:
...
public int 1numbered { get; set; }
...
This is not a GObject property, since it's started with a number.
Does it mean that I couldn't connect to notify["1numbered"] signal?
In case that I can't connect to notify signal, and I have this code instead:
...
int _1numbered = 0;
public int 1numbered {
get { return _1numbered };
set {
if (_1numbered == value)
return;
// otherwise
_1numbered = value;
notify("1numbered");
};}
...
Would this notification is valid and would work?
Tal
Date: Fri, 11 Oct 2013 03:21:24 +0200
From: flo brosch gmail com
To: evan coeus-group com
CC: knocte gmail com; vala-list gnome org
Subject: Re: [Vala] Properties == GObject properties?
it depends on the type, but usually yes.
It depends on the type, accessibility, member-binding, "virtual",
attributes and name[1].
[1]https://git.gnome.org/browse/vala/tree/codegen/valagobjectmodule.vala#n695
On 10 October 2013 21:36, Evan Nemerson <evan coeus-group com> wrote:
On Thu, 2013-10-10 at 21:18 +0200, "Andrés G. Aragoneses" wrote:
Quick question, are properties of objects in vala bound to gobject
properties? That is, properties that can be found via
g_object_class_find_property()?
Assuming you're talking about a class which inherits from GLib.Object,
it depends on the type, but usually yes. Arrays (other than arrays of
strings) and delegates aren't.
Also, keep in mind that fields != properties. For example,
public class Foo : GLib.Object {
public int bar { get; set; }
public int baz;
}
In this case, "bar" is a GObject property, but "baz" isn't.
-Evan
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]