Re: [Vala] Question on Documentation and tutorials.


You can take a look at samples on the Vala main page :

If you want more informations about gtk and glib ecosystem, look at : or with devhelp (which is
better) with the right documentation installed on your system.

And finally you can take a look at the *.vapi (/usr/share/vala/vapi)
files which represent C libraries on the Vala programming language.

Example: you want to eject a specific volume
    1. look at devhelp about 'volume' and after reading and navigating
through each referenced doc, you know that you must get all the
GDrives from a GVolumeMonitor object.
               // in C
               GVolumeMonitor* myVolumeMonitor = g_drive_get_volumes();
               GList* myDrives = g_volume_monitor_get_connected_drives
( myVolumeMonitor );
    2. Then look at the corresponding vapi file to find the Vala
classes and fonctions names (Usually C class name without the first
'G' and C function name without class prefix).
               // in Vala
               VolumeMonitor myVolumeMonitor = VolumeMonitor.get ();
               List myDrives = myVolumeMonitor.get_connected_drives ();
               foreach ( Drive drv in myDrives )
                      stdout.printf (drv.get_name ());

After some writing some samples like that, you can read significations
of keywords like : weak, abstract, virtual; in the documentation

good bye and good luck ;)

2008/8/22 Ahm ed <zrchrn gmail com>:
 I just wanted to start by saying that I really do appreciate all the work
that you do here on vala and I am very excited for the completion of this
language and it's tools. As such I am interested in learning vala, however I
have had a hard time with the documentation. I have looked through the
tutorial located at which I found to be
informative. Also some of the examples on the vala web site are pretty good,
though I would appreciate more comments and explanations of certain things.
However the documentation doesn't not seem to be through or complete, for
example file I/O is one thing I have not found full documentation for.
Another thing that I think would be useful would be a standalone vala-gtk
api with it's own tutorials. If these things I mentioned are available
please point me in the right direction. I have mostly worked with C++ and Qt
as well as a little gtkmm so I am not really familiar with C and the C api
for gtk etc.

 I understand that this is all a work in progress and I do appreciate your
efforts, I am just eager to get started on some projects with vala.


Vala-list mailing list
Vala-list gnome org

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