8 Jul 2012 12:02
[Vala] Accessing a foreign class property
Hello,
The following code yields an error "invocation not supported in this
context". Is there a way for test2 to access test1 property?
public class test1 {
public enum state {
FILL,
DRAW
}
private static state _state;
public static state drawing_state {
get { return _state; }
set { _state = value; }
}
public void test1 () {
_state = state.DRAW;
}
}
public class test2 {
public static void m () {
if (test1.drawing_state() == state.FILL) {
stdout.printf("FILL\n");
} else {
stdout.printf("DRAW\n");
(Continue reading)
RSS Feed