func init // initialize the type of the item in a collection or an array if(isdef("Type")) this.type = 'var' else this.type = code(this.props("Type").value.props("TypeName").value) if(this.type == 'Object undefined') this.type = 'var' end end this.typecode = sys.type_code(this.type) end func doForEach(data) blk.println('foreach (', this.type, ' ', this.codename, ' in ', d("obj"), ') {').inc() event("onItem", sub(this.codename, this.typecode)) blk.dec().println('}') event("onStop") end func doBreak() if(linked("doForEach")) blk.println('break;') end end func doContinue() if(linked("doForEach")) blk.println('continue;') end end