Re: Accessors vs Properties
- From: Tobias Knopp <tobias knoppweb de>
- To: Gergely Polonkai <gergely polonkai eu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Accessors vs Properties
- Date: Thu, 5 Jan 2017 08:33:03 +0100
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.2017 um 08:27 schrieb Gergely Polonkai <gergely polonkai eu>:
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 <tobias knoppweb de <mailto:tobias knoppweb de>> wrote:
Hi,
I am working on Gtk language bindings for the Julia programming language
(https://github.com/JuliaGraphics/Gtk.jl <https://github.com/JuliaGraphics/Gtk.jl>
<https://github.com/JuliaGraphics/Gtk.jl <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 backuped with a property and vice versa?
- Which one is to prefer?
I tried to find documentation on this but have not found anything.
Thanks,
Tobias
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org <mailto:gtk-app-devel-list gnome org>
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
<https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]