Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to compare two projects?
Message
De
19/01/2009 15:11:11
 
 
À
19/01/2009 09:52:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01375060
Message ID:
01375223
Vues:
26
>Hi all
>
>I search a way to compares two project. Is ther a tool to do this ?
>

From my session on working with existing code:
*==============================================================================
* Program:				LISTMISSINGFILES.PRG
* Purpose:				Make a list of files in one project that aren't in another
* From:				    Practical Tips for Working with Existing Code
* Copyright:			(c) 2007 Tamar E. Granor, Ph.D.
* Last revision:		03/21/07
*==============================================================================

LPARAMETERS cOldProject, cNewProject

LOCAL oOld as VisualFoxpro.IFoxProject, oNew as VisualFoxpro.IFoxProject

MODIFY PROJECT (m.cOldProject) NOWAIT 
oOld = _VFP.ActiveProject

MODIFY PROJECT (m.cNewProject) NOWAIT 
oNew = _VFP.ActiveProject

CREATE CURSOR Missing (mFile M)

LOCAL oFile, oNewFile, cFileName

FOR EACH oFile IN oOld.Files
	* Look for each file from the old project in the new project.
	* The filename without path is the key in the collection.
	cFileName = JUSTFNAME(oFile.Name)
	
	TRY
		oNewFile = oNew.Files[m.cFileName]
		
	CATCH  
		* Used in old, not in new
		INSERT INTO Missing VALUES (oFile.Name)
		
	ENDTRY
ENDFOR
Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform