Re: [Vala] Inverse of control in VALA?



On Mon, 2009-01-26 at 14:24 -0800, Christian Hergert wrote:
On Mon, Jan 26, 2009 at 12:26 PM, Pawel Cesar Sanjuan Szklarz
<paweld2 gmail com> wrote:
Hi.

Is it planed any feature to support inverse of control on VALA??

In java I found that this can be really helpfull. A good library for
this on java is guice:

http://code.google.com/p/google-guice/


Pawel Szklarz.

Implementing a factory to create items and read from an external file
or whatever seems pretty easy with GObject. What looks like a pain is
making sure all the types are registered simply so you can have access
to the GType by name.

I guess the other option could be to convert a "SomeTypeName" to
some_type_name_get_type and look for the symbol and execute it to make
sure the type gets registered.

Yes. This is almost what GtkBuilder does.

For vala gtype_instance classes, you may want to convert to either
some_type_name_new
or some_type_name_construct,
since you can't create these objects with g_object_new.

BTW: wouldn't it be nice if VALA automatically register all vala defined
types in either g_module_check_load or main?

Best,

Yu



-- Christian
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




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