func init if(linked("Item") and linked("doRead")) sys.add_var_extern(this.name, 'dynamic') end // initialize the type of the item in a collection or an array if(not isdef("Type")) this.type = code(this.props("Type").value.props("TypeName").value) if(this.type == 'Object undefined') error(this.name + ' - propery Type is not define') end end end func make_read(data) dt = d("Array") idx = d("Index") if((idx == 'null') and isdef("Index"))// TODO idx = 0 end return((isdef("Type") ? '' : '(' + this.type+ ')') && dt && '[' && idx && ']') end func doRead(data) if(linked("Item")) blk.println(this.codename, ' = ', make_read(data), ';') event("onRead", (isdef("Type") ? '' : '(' + this.type+ ')') + this.codename) else event("onRead", make_read(data)) end end func doWrite(array, index, value) dt = d("Array") idx = d("Index") if((idx == 'null') and isdef("Index"))// TODO idx = 0 end blk.println(dt, '[', idx, '] = ', d("Value"), ';') end func Item if(linked("doRead")) return(this.codename) else return(make_read()) end end func Clone return(d("Array") + '.Clone()') end func GetEnumerator return(d("Array") + '.GetEnumerator()') end func IsFixedSize return(d("Array") + '.IsFixedSize') end func IsReadOnly return(d("Array") + '.IsReadOnly') end func IsSynchronized return(d("Array") + '.IsSynchronized') end func Length return(d("Array") + '.Length') end func LongLength return(d("Array") + '.LongLength') end func Rank return(d("Array") + '.Rank') end func SyncRoot return(d("Array") + '.SyncRoot') end