Re: [Vala] gtkaml 0.2.10 released

On Sun, May 16, 2010 at 12:57 AM, Luca Bruno <lethalman88 gmail com> wrote:

On Sun, May 16, 2010 at 12:09:53AM +0300, Vlad Grecescu wrote:
This:  is generated at compile time - and it has a univoque mapping with
Vala code. (The new version I'm working on will generate directly Vala
nodes, not source files.)

Plus, Gtkaml uses exactly the symbol names as found in  .vapi files, so
easy to maintain and easy to gain access to new Gtk+ features.

I still don't see the point of all this. You're using your own xml
definition, but you could use the GtkBuilder one, I don't think it's that
different. Also, in unix programming people always tried to abstract things
instead of avoid generating code like Java or other folks do out there.

What you're getting here is generating Vala code at compile time, only
because you want to skip the XML parsing at runtime because it's "faster"?

I am not sure if we're actually debating on the usefulness of the project,
because I can't see why we would do that.

I will however bite, and answer the following two points:
1. 'you could use the GtkBuilder XML'
2. 'generating code like Java folks'

1. First, this is the GtkBuilder equivalent for the same GUI:
      <object class="GtkHBox" id="hbox1">
          <object class="GtkLabel" id="label1">
            <property name="label">_Hello</property>
            <property name="use_underline">True</property>
            <property name="expand">False</property>
            <property name="fill">False</property>
            <property name="position">0</property>
          <object class="GtkEntry" id="my_entry">
            <property name="text">World!</property>
            <property name="position">1</property>

Gtkaml has two advantages over this alone: brevity and naming (e.g.
"use_underline" is actually "with_mnemonic" in Gtk - who's "using his own
xml definition"?).

2. On the issue of generating code: I am not doing bytecode-magic as Java
people do; I just let the user code in the same widget class, therefore the
access to 'my_entry' is simply

my_entry.text = 'new text';

whereas in gtkbuilder things are a little more complicated.

Of course, general design principles will tell you not to mix here in the
widget any 'business' code (just as general coding principles keeps gobject


I repeat, I am not arguing here for the usefulness of the project, this is
in the eye of the beholder.

The fact that is as fast as written by hand may attract some, while it may
be disliked by you.
The fact that I can indeed be written by hand appeals me, that's why I
started the project.


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