Re: [Vala] gtkaml 0.2.11 and 0.2.12 released

 I have commited another simplifications:

the attribute "gtkml:root" is an alias for xmlns=Gtk xmlns:gtkaml=

So no "Gtk:" prefix required anymore.


On 10/20/10 03:07, pancake wrote:
I have commited an initial work on the alternative syntax for gtkaml.

I have named it 'gtkml' (simple one :P) But im open for suggestions
to change it. The source is found in the gtkaml project inside the
simple/ directory. It is not yet integrated with the gtkaml compiler,
it is just a proof of concept, so all you can try and let us know
your feelings about the syntax.

$ ./gtkml foo.gtkml -->  will translate gtkml into a .gtkaml XML file
$ gtkamlc --pkg gtk+-2.0 foo.gtkaml
$ ./foo

There's not much syntax parsing checks, so expect weird errors if
writing invalid constructions.

Here's a sample program:

Gtk:VBox gtkaml:name=MyVBox xmlns:gtkaml=
         xmlns=GLib xmlns:Gtk=Gtk homogeneous=false spacing=0
         gtkaml:preconstruct {
                 /*- message ("root preconstruct code"); -*/

         Gtk:VBox homogeneous=true spacing=0 {
                 Gtk:HBox homogeneous=true spacing=0 {
                         Gtk:Label label=One gtkaml:public=label;
                         Gtk:Button label=Two clicked="clicked()";
                         Gtk:Label label=Tri gtkaml:public=label2;
         static void clicked () {

         static int main (string[] args) {
                 Gtk.init (ref args);
                 var w = new Gtk.Window (WindowType.TOPLEVEL);
                 var g = new MyVBox();

                 g.destroy.connect (Gtk.main_quit);
                 g.show_all ();
                 w.add (g);

                 Gtk.main ();
                 return 0;

On Tue, 19 Oct 2010 15:13:46 +0200
Frederik<scumm_fredo gmx net>  wrote:

Vlad Grecescu wrote:
However, the current choice of XML is based on the fact that XML only
has namespace support. YAML and JSON need a way to emulate that..
(g-point-something is an option)
Actually, I'm not suggesting JSON, but a JSON-like syntax. Of course,
this requires a self-written parser. You could define the syntax for
namespaces and code islands at will.

Compare JFX Script and QML, which aren't JSON either

with real JSON:

Best regards,

vala-list mailing list
vala-list gnome org

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