Re: [Vala] Returning subclass objects from superclass, or type synonyms

2020-04-28 Thread Nor Jaidi Tuah
> > Point p_result = p.add(p_other);// compiler error How about Point p_result = p.add(p_other) as Point; Nice day Nor Jaidi Tuah [https://drive.google.com/uc?id=1b4cWTCBfgIRVuVv9iDUuHkscey4c5Ug9] PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you are

[Vala] Returning subclass objects from superclass, or type synonyms

2020-04-28 Thread Maurizio Ferreira via vala-list
I need to define a function in a superclass that should return the same type of object on which it is called example : (constructors, functions and properties removed, for clarity) class Tuple { > public Tuple add (Tuple another) { > // ... > } > } > class Point : Tuple { >//

Re: [Vala] Classes as objects?

2012-06-06 Thread Robert Schroll
. Thanks, Robert On 06/03/2012 01:57 PM, Robert Schroll wrote: Hi all, Is it possible to treat classes as objects in Vala, similar to how delegates let you treat methods as objects? What I'm trying to do is go through a list of classes and call a static method on each. In Python, I could do

Re: [Vala] this in objects

2011-08-04 Thread Sébastien Wilmet
On Wed, Aug 03, 2011 at 10:57:16PM +0200, Jens Georg wrote: On Mi, 2011-08-03 at 20:39 +0200, Pavol Klačanský wrote: Hi, why somebody uses this. prefix and somebody doesn't, I have tried and it worked with or without it It's a matter of taste and or coding guidelines or explicitly

Re: [Vala] this in objects

2011-08-04 Thread Maciej Marcin Piechotka
On Wed, 2011-08-03 at 20:39 +0200, Pavol Klačanský wrote: Hi, why somebody uses this. prefix and somebody doesn't, I have tried and it worked with or without it 1. class Test { private int i; public Test(int i) { this.i = i; // field is assigned by variable i = this.i; //

[Vala] this in objects

2011-08-03 Thread Pavol Klačanský
Hi, why somebody uses this. prefix and somebody doesn't, I have tried and it worked with or without it ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] this in objects

2011-08-03 Thread Jens Georg
On Mi, 2011-08-03 at 20:39 +0200, Pavol Klačanský wrote: Hi, why somebody uses this. prefix and somebody doesn't, I have tried and it worked with or without it It's a matter of taste and or coding guidelines or explicitly avoid shadowing of object members by local variables. this can be

[Vala] using liststore objects

2009-05-29 Thread Joss 4
Hi Yu, Thanks again, With your post I began to understand something abou the name convention and style settings. Now I try to do some test. In order to set GTK properties do you think it always be this way for ever? I was asking why one can't set properties directly like code :