Re: [Vala] About composite templates and its constructors
- From: Luca Bruno <lethalman88 gmail com>
- To: vala-list gnome org
- Subject: Re: [Vala] About composite templates and its constructors
- Date: Thu, 06 Aug 2015 16:05:58 +0200
On 06/08/2015 16:01, Andres Fernandez wrote:
Hi folks!
I've been playing for a while with composite templates on
vala, and made a lot of progress to reach what I expected of
my work on it. It's just great!
Well, anyway, I had a problem and didn't get any clue on the
web. I have two composite templates there is a MyWindow
class and a MyTreeView class. the .ui file of MyWindow
template has an object of MyTreeView class. At this point
everything works great.
But, MyTreeView class assign it a model of mine on its
constructor function. But, as MyTreeView is get as a
[GtkChild], in MyWindow composite template class, its
constructor function never runs, so that MyTreeView object
has no model assigned. I can assign one to it on MyWindow
class, but I wanted to avoid that.
Is there any way to execute the constructor code of a
composite template that is a [GtkChild] of another composite
template class?
Thanks in advance!
Try writing constructors with construct { }, which is the gobject
construction.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]