[Glade-devel] Glade Binding Framework
Vincent Geddes
vincent.geddes at gmail.com
Fri Mar 23 17:25:55 EDT 2007
Hi Juan
On Thu, 2007-03-08 at 17:32 -0300, Juan Pablo Ugarte wrote:
> There you go, This is a draft i would like to include in the binding
> directory and use it as a base for the documentation.
>
> Please ask as many question you like!
>
> glade rules!
>
Hey, I have tested the python bindings, very nice indeed.
Here's some feedback.
> From the overview attached to your post, you mention:
> The core will search for script in two different directories,
> datadir/package/scripts/ and g_get_user_config_dir()/package/scripts/
Shouldn't scripts be installed under `g_get_user_data_dir()' instead of
`g_get_user_config_dir'? I think scripts and compiled bytecode qualify
more as data than configuration files.
>
> class GladeMyBoxAdaptor(glade.get_adaptor_for_type ('GtkHBox')):
> __gtype_name__ = 'GladeMyBoxAdaptor'
>
is the `glade.get_adaptor_for_type ('GtkHBox')' API the only way to get
an adaptor class in any language we provide bindings for? This works in
Python and Ruby as they seem to treat classes as normal objects. I doubt
C++ classes can be treated as objects (unless RTTI allows that) though,
and I don't think the C++ syntax allows one to subclass a class in such
a way either. The same probably goes for many other languages as well.
In a nutshell, I highly doubt this will work in C++:
class MyBoxAdaptor : public Glade::get_adaptor_for_type ("GtkHBox")
{
...
}
Shouldn't we just provide the class definitions statically, so that
developers can subclass in the way it's usually done in most languages?
cheers
Vincent
More information about the Glade-devel
mailing list