Re: [Vala] GIO: nullable parameters, File object construction



Jürg Billeter wrote:
No, that's intentional. GLib.File is an interface, not a class, and
interfaces never have creation methods. GLib.File.new_for_path() is a
static factory method, that uses the default Vfs to create an instance
of a class that implements GLib.File.

Jürg

Thanks. That interfaces can't have constructors sounds reasonable to me. But to me it seems strange that an interface may have static methods and one can actually call static methods on an interface. I guess GObject interfaces are different from Java / C# interfaces in that aspect.

Regards,

Frederik




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