A
Andrew
How is it possible to define a constant in a virtual class?
E.g. I wrote the following code
tml = {
sayHello : function()
{
alert('hello');
}
}
now if I want to add a constant into tml virtual class, what I need to
do?
I tried something like
tml = {
const1 : Integer = 0,
sayHello : function()
or
tml = {
const1 : function(){return 0;},
sayHello : function()
in both case, trying to get - inside tml object - the value of
const1 ... it results in a Object value and not the Integer value I
need.
Where am I doing mistakes?
Thanks
Andrea
E.g. I wrote the following code
tml = {
sayHello : function()
{
alert('hello');
}
}
now if I want to add a constant into tml virtual class, what I need to
do?
I tried something like
tml = {
const1 : Integer = 0,
sayHello : function()
or
tml = {
const1 : function(){return 0;},
sayHello : function()
in both case, trying to get - inside tml object - the value of
const1 ... it results in a Object value and not the Integer value I
need.
Where am I doing mistakes?
Thanks
Andrea