func init // defines instance this.instance = this.props("Method").value.instance // defines type this.type = sys.get_manager_prop('Method', 'Type') if(this.type == '') this.type = 'void' end this.typecode = sys.type_code(this.type) // defines types if(this.numdatas) this.types = sys.get_manager_prop('Method', 'Types') end end func doMethodInside(data) if(this.type == 'void') blk.println(this.instance, '(', this.get_arguments(data), ');') else dt = this.instance + '(' + this.get_arguments(data) + ')' event("onResult", sub(dt, this.typecode)) end end func doMethodOutside(data) namespace = this.get_namespace() if(this.type == 'void') blk.println(namespace, '.', this.instance, '(', this.get_arguments(data), ');') else dt = namespace + '.' + this.instance + '(' + this.get_arguments(data) + ')' event("onResult", sub(dt, this.typecode)) end end func get_namespace() el = this.parent.get_parent_sdk() if(isdef("Namespace")) tMode = sys.get_manager_prop('Method', 'TypeModifier') if(tMode _and_ 8) // static? namespace = code(el.cName) else namespace = code(el.instance) end else namespace = code(el.cName) + '.' + this.props("Namespace").value.instance end return(namespace) end func get_arguments(data) arguments = '' if(this.numdatas) arguments = '' + sys.to_type(d(this.pt_data(0).name), sys.type_code(this.types.get(0))) for(n = 1; n < this.numdatas; n++) arguments = '' + arguments + ', ' + sys.to_type(d(this.pt_data(n).name), sys.type_code(this.types.get(n))) end end return(arguments) end