Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An automation way of finding updated props/methods in cl
Message
De
22/12/2004 10:29:36
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00971321
Message ID:
00971426
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>A Merry Christmas to all.
>
>I have a set of classes (I also have the originals of them) which I have updated as and when required. Now it seems that there just maybe some corruption in some of them.
>
>What I would like to do is to programatically somehow find out all the changes I have done to these classes. Then replace the original class files and then reapply my changes.
>
>Hopefully all this can be done programatically.
>
>Please advise.

Bhavbhuti,
Check SCCText.prg. You can get text versions of classes and compare them with something like windiff. I use below code when I need such a thing:
*GetDifferences.prg
Local lcExtension, lcType, lcFileSet1,lcFileSet2

lcExtension = InputBox('File type','Select','SCX',10000,'SCX')
lcDir1 = GetDir() && Folder to compare from
lcDir2 = GetDir() && Folder to compare to
lcSub  = InputBox('Subfolder','Select','forms',10000,'forms')
DO case
	Case Upper(lcExtension) = 'SCX'
		lcType = 'K'
	Case Upper(lcExtension) = 'VCX'
		lcType = 'V'
	Case Upper(lcExtension) = 'LBX'
		lcType = 'B'
	Case Upper(lcExtension) = 'MNX'
		lcType = 'M'
	Case Upper(lcExtension) = 'FRX'
		lcType = 'R'
	Case Upper(lcExtension) = 'DBC'
		lcType = 'd'
EndCase
lcSkeleton = '*.'+lcExtension
lcExt      = 'SCC'
lcTarg1    = 'd:\Check1'
lcTarg2    = 'd:\Check2'
Erase (Addbs(lcTarg1)+'*.*')
Erase (Addbs(lcTarg2)+'*.*')

CreateDirectories(lcDir1,lcSub)
CreateDirectories(lcDir2,lcSub)
CreateDirectories(lcTarg1,lcSub)
CreateDirectories(lcTarg2,lcSub)

GetText(lcDir1, lcTarg1, lcSub, lcSkeleton, lcExt, lcType)
GetText(lcDir2, lcTarg2, lcSub, lcSkeleton, lcExt, lcType)


FUNCTION CreateDirectories
LPARAMETERS tcSource, tcSub
tcSource = ADDBS(tcSource)
If !Directory(tcSource)
	Md (tcSource)
	MD (tcSource+tcSub)
ELSE
	IF !DIRECTORY(tcSource+tcSub)	
		MD (tcSource+tcSub)
	endif
Endif


Function GetText
Lparameters tcSource, tcTarget, tcSub, tcSkeleton, tcExt, tcType
LOCAL ix, lnFiles, lcInFile, lcOutFile
LOCAL ARRAY arrFiles[1]
tcSource = ADDBS(tcSource)+ADDBS(tcSub)
tcTarget = ADDBS(tcTarget)+ADDBS(tcSub)
lnFiles = Adir(arrFiles, tcSource + tcSkeleton)
For ix=1 To lnFiles
	lcInFile  = tcSource+arrFiles[ix,1]
	lcOutFile = Forceext(tcTarget+arrFiles[ix,1], tcExt)
	Do (Home()+'scctext.prg') With lcInFile, tcType, lcOutFile, .T.
Endfor
My application directories look like:
..\MyAppVersionX\Classes
..\MyAppVersionX\Forms
...
..\MyAppVersionY\Classes
..\MyAppVersionY\Forms

etc.
I set file type to VCX, select MyAppVersionX and MyAppVersionY directories then specify Classes as Subfolder. It creates hardcoded d:\Check1 and Check2 directories and puts text versions there.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform