>scctext doesn't change the method order, VFP does. afaik, vfp7 still does this.
>scctext just takes the methods field out of the ?cx file and put it into the output.
Yes, of course. I thought that this (the fact that VFP probably changed the method order in the metatable) was the case, just after sending the posting.
I'll check on this later. Thank you.
>
>i haven't seen a corrected version, but it would be easy enough to fix.
>the methods field holds the methods as if they are in a prg, with PROCEDURE..ENDPROC around each one, with a crlf after the ENDPROC.
>just keep peeling of
left(methods, at("ENDPROC"+chr(13)+chr(10), methods)+8)
>e.g.
>
>** 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.
>>
>>1) Does anyone know whether this problem is solved in VFP 7?
>>
>>2) If not, I saw code fixes (to scctext.prg) somewhere to sort methods. Does anyone have a thusly corrected version of scctext.prg?
>>
>>Actually, I don't use VSS, but Perforce SCM (this is free for one or two programmers). But I think the same scctext.prg program is still used.
>>
>>TIA, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)