Re: Accessors vs Properties

2017-01-05 Thread Tobias Knopp
Hi, so you mean that the getter/setter usually internally calls the dynamic „property“ version where the property is passed as a string? Thus it would make sense that language bindings are fine using the get/set_property methods since there is no overhead. Best regards, Tobias > Am 05.01.201

Re: Accessors vs Properties

2017-01-05 Thread Tobias Knopp
Thanks, do you know what the Python gtk bindings (3.x) are using? Tobias > Am 05.01.2017 um 11:05 schrieb Debarshi Ray : > > On Tue, Jan 03, 2017 at 10:46:13PM +0100, Tobias Knopp wrote: >> - Is any accessor backuped with a property and vice versa? > > Nicola already answered this. > >> - Whic

Re: Accessors vs Properties

2017-01-05 Thread Debarshi Ray
On Tue, Jan 03, 2017 at 10:46:13PM +0100, Tobias Knopp wrote: > - Is any accessor backuped with a property and vice versa? Nicola already answered this. > - Which one is to prefer? It depends. For simple setting and getting of values from C, I prefer the accessors because (a) it lets the compil

Re: Accessors vs Properties

2017-01-05 Thread Nicola Fontana
Hi, Il Tue, 3 Jan 2017 22:46:13 +0100 Tobias Knopp scrisse: > ... > - Is any accessor backuped with a property and vice versa? Only the second part stands, i.e. any property should have its own accessors. There is some exception though, e.g. GtkContainer:child, but that is a special property an

Re: Accessors vs Properties

2017-01-05 Thread Nicola Fontana
Il Thu, 05 Jan 2017 07:27:10 + Gergely Polonkai scrisse: > Hello, > > I don't know about others, but in my own code, my_obj_set_property() does > nothing else just calls the setter functions (and the same for getters). It > makes much more sense, and I saw it in a lot of Gtk and Gnome code,

Re: Accessors vs Properties

2017-01-04 Thread Gergely Polonkai
Hello, I don't know about others, but in my own code, my_obj_set_property() does nothing else just calls the setter functions (and the same for getters). It makes much more sense, and I saw it in a lot of Gtk and Gnome code, too. Best, Gergely On Wed, Jan 4, 2017, 19:27 Tobias Knopp wrote: > H

Accessors vs Properties

2017-01-04 Thread Tobias Knopp
Hi, I am working on Gtk language bindings for the Julia programming language (https://github.com/JuliaGraphics/Gtk.jl ) and have a question regarding the accessor methods (methods with „get“ and „set“ in them) and the property system. - Is any accessor