Re: [Vala] Question about creation methods



Vlad Grecescu <b100dian gmail com> writes:

Hello,

If a class has a creation method e.g. VBox(bool homogeneous, int 
spacing) and another class is extending it e.g.
public class MyVBox : VBox {
    public MyVBox () {}
}

what happends with VBox's creation method? Is MyVBox in an invalid state 
because it instantiates the base class with g_object_new without any 
properties?


Yes

Another question would be if base access of creation methods will be 
possible in the future:
   public MyVBox () {
       base (true, 0); //or base.alternative_creation_method (true, 0)
   }


As far as I understend the GObject it is not possible as in *_new methods
the object is created of a given type.

Thank you,
Vlad

Regards
-- 
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)




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