Re: [Vala] Class vs struct with signal
- From: Steven Oliver <oliver steven gmail com>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Class vs struct with signal
- Date: Wed, 1 Nov 2017 15:32:42 -0400
I finally figured this out, though I don't understand why what I did works.
I changed the signal connection to use a non-existent variable named msg.
Logging.get_default ().publish.connect ((msg) => {
this.log (msg) ;
}) ;
Can anyone explain why doing that lets me use my new LogMsg object with my
Logger class' signal??
Steven N. Oliver
On Sun, Oct 29, 2017 at 8:43 PM, Steven Oliver <oliver steven gmail com>
wrote:
I was using a struct when connecting to my signal, but now I'm using a
class. This code now longer compiles, does anyone know what I'm doing wrong?
Logging.get_default ().publish.connect ((LogMsg) => {
this.log (LogMsg) ;
}) ;
I get the following error message:
BalisticaApplication.c: In function ‘__lambda12_’:
BalisticaApplication.c:311:10: error: ‘_tmp0_’ undeclared (first use in
this function)
LogMsg* _tmp0_ = NULL;
^
BalisticaApplication.c:311:10: note: each undeclared identifier is
reported only once for each function it appears in
src/CMakeFiles/balistica.dir/build.make:178: recipe for target
'src/CMakeFiles/balistica.dir/BalisticaApplication.c.o' failed
Steven N. Oliver
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]