Re: g_object_set_data or subclass?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi;

On 24 September 2016 at 15:39, Konstantin P. <ria.freelander@xxxxxxxxx> 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]
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux