Re: g_object_set_data or subclass?
- From: Emmanuele Bassi <ebassi gmail com>
- To: "Konstantin P." <ria freelander gmail com>
- Cc: ML-gtk <gtk-list gnome org>
- Subject: Re: g_object_set_data or subclass?
- Date: Sat, 24 Sep 2016 16:19:08 +0100
Hi;
On 24 September 2016 at 15:39, Konstantin P. <ria freelander gmail com> wrote:
What is better for storing a widget state ?
In general, if your language facilities allow it more easily than C,
it's highly recommended to subclass a widget in order to store
additional state.
Using the GDataSet field of GObject is a last resort — reserved for
libraries, for instance, or for code that has to deal with third party
widgets that cannot be modified to, for instance, add an interface.
Even with GObject/C, subclassing is usually recommended for newly
written code, though it can get verbose.
Ciao,
Emmanuele.
--
https://www.bassi.io
[@] ebassi [@gmail.com]
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]