Code: Select all
obj := {}
obj.prop := 10
obj.meth := func("myMeth")
obj.meth(10)
print(obj.prop)
myMeth(inp){
print("inside myMeth()") ;To confirm if method is called
print(this.prop) ;should print "10"
this.prop := this.prop + inp ;should add 10 to 10
print(this.prop) ;should print "20"
}
I want to access the various properties belonging to obj inside myMeth()
I understand the Classes section, explains how to properly define a class but I really want to know how this works too.
I know, that V1 is as dead as latin, but until the library porting for V2 catches up, I will be on V1.
Any help would be greatly appreciated!