left(methods, at("ENDPROC"+chr(13)+chr(10), methods)+8)
** look for the MemoWrite procedure, there's this line.. ** =fwrite(this.iHandle, &cFieldname) ** replace it with this code If cFieldname=="METHODS" lnArea = Select() ** put into string for parsing lcMethods=allt(methods) ** cursor for ordering create cursor cutmp (cname c(150), mcode m) index on upper(cname) tag cname ** peel off each method ** they all end with ENDPROC+crlf do while !empty(lcMethods) lcCurrent=left(lcMethods, at("ENDPROC"+chr(13)+chr(10), lcMethods)+8) insert into cutmp values (mline(lcCurrent,1), lcCurrent) lcMethods=strtran(lcMethods,lcCurrent) enddo ** write out from the tmp cursor select cutmp Scan =fwrite(this.iHandle, mcode) EndScan Select (lnArea) Else *-- original code =fwrite(this.iHandle, &cFieldname) EndIf>I actually don't care whether any method has moved, only what methods I have actually changed! I read somewhere that the problem is that scctext.prg shuffles methods around arbitrarily.