Re: [Vala] this = Object
- From: Cyrille Colin <colin univ-metz fr>
- To: Robert Powell <rob yorba org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] this = Object
- Date: Tue, 28 Sep 2010 21:08:45 +0200
hi,
even if it's weird, it worked. I'll try to write a piece of test case to
explain in vala better than in english ... :S
@robert : to call methods on object you need to know the method and the
object that's why I keep the reference to the object. When the method is
called it have to know the object it belows.
I'll write a case, i really want to know a good way to do this.
Cyrille.
Le mardi 28 septembre 2010 à 09:28 -0700, Robert Powell a écrit :
Hi Cyrille,
and this is my callback in Vala code:
public uint32 cb (ValaObj obj, int value) {
this = obj;
...
}
it works fine with 0.8.1 and throw exception with 0.10 :
error: unsupported lvalue in assignment
May someone could help me,
thanks in advance,
Cyrille.
I believe you are not allowed to assign to "this". Without seeing
more code, it is hard to tell what you are trying to do. Why do you
need to assign "this"? Why can't you just call public methods on obj?
Hope that helps,
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]