Properties
Posted: Thu May 03, 2012 9:13 pm
what goofy thing am i doing to prevent assigning 3 to the member property of the z instance? code prints out "0", but i expect it to print "3". thanks.
class DoSomething
def main
z = GlobalVars()
z.ticksPerSecond = 3
print z.ticksPerSecond
class GlobalVars
var _ticksPerSecond as decimal
pro ticksPerSecond as decimal
get
return _ticksPerSecond
set
_ticksPerSecond = .ticksPerSecond