Re: [gtk-list] Dynamic class creation?
- From: Kenneth Albanowski <kjahds kjahds com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Dynamic class creation?
- Date: Wed, 2 Sep 1998 18:51:29 -0400 (EDT)
On Wed, 2 Sep 1998, Johannes Keukelaar wrote:
> Hi *,
> An admittedly unusual question: Is there anything in the gtk+ architecture that
> would make it impossible to dynamically create object classes?
Classes can definitely be dynamically created -- this is obvious, because
the usual GUI classes are not created until the first reference.
I'm not sure whether there are any deletion facilities.
> In a project I'm working on, I'd like to use the gtk+ object system as basis
> for some datastructures I'll be creating. These datastructures would be of some
> kind of parametrized type, with complicated parameters, but possibly many
> instances of each individual parametrized type. The actual parameters to be
> used will only be available during runtime (so things will be more easily
> extensible). So, I could store these complicated parameters in a separate
> structure, and point to that from the individual objects, or I could put this
> information in the object classes, but then I'd have to create them at runtime.
> Is this possible?
You can very easily store all sorts of data in any sort of object. Look at
the gtk_object_set/get_data functions.
Kenneth Albanowski (firstname.lastname@example.org, CIS: 70705,126)
] [Thread Prev