Re: [Vala] VAPI GOBJECT/gtk binding constructions differ



On Tue, 2008-03-25 at 23:57 +0100, Mikael Hermansson wrote:
hmm  I have noticed this:


Gtk.Image a = new Gtk.Image().new_from_file(...)

You probably mean

    new Gtk.Image.from_file ()

then we have

GLib.File = File().new_for_path(...)

You probably mean

    File.new_for_path ()

Why not use the same rules for all this special constuctions?

The reason GFile is different is that GFile is an interface, not a
class. g_file_new_for_path is not a normal creation method, it's just a
static (factory) method that returns a new instance of a class that
implements GFile.

Jürg




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