On Fri, Mar 26, 2010 at 11:07:20AM +0800, PCMan wrote:
Hi list, I tried to use Vala for the first time and the following code failed to generate correct C code. Is this a bug of vala or what's wrong with my code? (code is attached to the end of this mail)
You define *_finish which is already defined by making the standard
functions async. Read
http://live.gnome.org/Vala/Tutorial#Asynchronous_Functions
But Vala should probably report an error if one creates an async
function "f" and a function "f_finish"; instead of creating invalid
code.
In addition, if I want to override a virtual function in a parent class with the prototype like this: public virtual unowned GLib.List get_volumes (); How can I return an unowned GLib.List in my override function? I tried and tried but nothing works.
Something like this should work:
public override unowned GLib.List get_volumes() {
return list;
}
You of course need a reference to the list somewhere in your
class.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Attachment:
pgp4pUToPPRv0.pgp
Description: PGP signature