Re: what's the best way to handle variables and objects?
- From: Andreas Stricker <andreas stricker fela ch>
- To: gtk-app-devel-list gnome org
- Subject: Re: what's the best way to handle variables and objects?
- Date: Fri, 17 Mar 2006 09:27:24 +0100
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]