i am trying to use an enum in a different class (not the class which defined it).
my code is similar to this:
class classA
{
enum
{
SCREEN_1,
SCREEN_2
}
function fA()
{
var screen = SCREEN_1;
Sys.println("classA:"+screen);
}
}
class classB
{
function fB()
{
var screen = classA.SCREEN_1;
Sys.println("classB:"+screen);
}
}
the output ot this is:
classA:0
classB:class
i have tried to use toNumber(), but i get an exception.
i have also defined the enum as static, but this did not help either.
any idea?
thank you in advance