*** *** ------------------------- *** define class deBase as custom dime aCursorStructure(1,16) nCursorFields= 0 oForm= .t. dime aCursors[1] nCursors= 0 *--------------------- procedure Clone(c1,c2) local a[1],b[1] select (c1) =aField(a) create cursor (c2) from array a append blank for each c in this.aCursors if type("C")= "L" exit endif if c= c2 return endif endfor this.nCursors= this.nCursors+1 dime this.aCursors[this.ncursors] this.aCursors[this.nCursors]= c2 *------------------------------------------------- procedure AddToCursorStructure(cTable,cField,cType,nL,nD) local cType this.nCursorFields= this.nCursorFields+1 dime this.aCursorStructure(this.nCursorFields,16) if !empty(cTable) select (cTable) =afields(aCursorStructure,cTable) for n=1 to alen(aCursorStructure,1) if upper(aCursorStructure(n,1))= upper(cField) for n1= 1 to 4 this.aCursorStructure[this.nCursorFields,n1]= aCursorStructure[n,n1] endfor endif endfor else this.aCursorStructure(this.nCursorFields,1)= cField this.aCursorStructure(this.nCursorFields,2)= cType this.aCursorStructure(this.nCursorFields,3)= nL this.aCursorStructure(this.nCursorFields,4)= nD endif this.aCursorStructure[this.nCursorFields,5]= .f. this.aCursorStructure[this.nCursorFields,6]= .f. for n1= 7 to 16 this.aCursorStructure[this.nCursorFields,n1]= "" endfor *------------------------------------------- procedure CreateFromCursorStructure(cCursor) create cursor (cCursor) from array this.aCursorStructure this.nCursorFields= 0 this.nCursors= this.nCursors+1 dime this.aCursors[this.nCursors] this.aCursors[this.nCursors]= cCursor *------------------------------------ procedure Clear for each C in this.aCursors select (C) if C=="GL" scatter memvar memo blank gather memvar memo else zap endif endfor unlock all *------------------------------------ procedure Destroy this.DestroyCursors() *------------------------------ procedure DestroyCursors() local c if this.nCursors= 0 * error "Program Error: DE did not register cursors" return endif for each C in this.aCursors if used(C) select(C) use endif endfor enddefine