Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Diff gives too much information
Message
From
19/07/2001 11:33:04
 
 
To
19/07/2001 07:32:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Source Safe Control
Miscellaneous
Thread ID:
00532441
Message ID:
00532622
Views:
13
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.

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.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform