this.Value = this.Value + 1 -- increment the value
event.method.ret1 = this.Value -- set the return value of the method (note: methods can have multiple return values)
event.handled = true -- this will prevent the MethodCall event from being sent to any base classes
print(string.format('%s = %s', event.custom.name, event.custom.newValue)) -- print some text to the output pane
local retVal = this:ChangeValue() -- call the ChangeValue method
this:ValueChanged(retVal) -- call the ValueChanged event using the return value of the method