func init // adds using namespace sys.add_use('System.IO') // initialize properties if(linked("doGetPart") and linked("Result")) sys.add_var(this.name, 2) end if(linked("onError")) this.setfield('ex', 'ex' + this.id) end end func doGetPart(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Part")) blk.println(this.codename, ' = ', this.make_part(data), ';') event("onGetPart", this.codename) else event("onGetPart", this.make_part(data)) end if(linked("onError")) blk.dec().println('} catch (ArgumentException ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func Result if(linked("doGetPart")) return(this.codename) else return(this.make_part()) end end func make_part(data) return('Path.Get' + this.props("Part").value + '(' + d("Path") + ')') end