Re: what's the best way to handle variables and objects?



John (J5) Palmieri wrote:
Yes.  It depends on your application.  Some people will subclass a
GObject and add the window object plus all of the other widgets as
aggregates.  If you are feeling more daring you can subclass your main
window where your app class would inherit from GtkWindow.  However if
you do not want to get into the intricacies of GObject inheritance
simply creating a struct would be fine:

I agree.

Usually it don't make sense to create a whole GObject descendant just
to pass some data. On the other hand it really make sense if we want
to use OOP/GObject mechanisms like subclassing, (virtual) methods and
reference counting. It depends on the complexity of the application.

Cheers,
Andy





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