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=http://gtkaml.org/0.1

So no "Gtk:" prefix required anymore.

  http://code.google.com/p/gtkaml/source/browse/trunk/simple/test0.gtkml

--pancake

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=http://gtkaml.org/0.1
         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;
                 }
                 Gtk:Entry;
         }
/*-
         static void clicked () {
                 message("clicked!\n");
         }

         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);
                 w.show ();

                 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

   http://en.wikipedia.org/wiki/JavaFX_Script#Syntax
   http://en.wikipedia.org/wiki/QML#Basic_QML_Syntax

with real JSON:

   http://en.wikipedia.org/wiki/Json#Data_types.2C_syntax_and_example


Best regards,

Ferderik
_______________________________________________
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]