Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cycling down Project Collections - Code Samples
Message
De
18/02/2008 08:40:43
 
 
À
18/02/2008 08:34:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01293412
Message ID:
01293417
Vues:
18
>I am intersted in some ready code samples that traverses along project collection(s) hierarchy.
>
>Like all files, reports, forms etc.
>
>TIA
>
>Sergio

Something like this ?
local Success
	Success = TRUE
	
	local i, obj, ProjectObj
	
	do case
	case !m.Success
	
	otherwise
	
		ProjectObj = Application.ActiveProject
		

		for i = 1 to m.ProjectObj.Files.Count
			
			obj = m.ProjectObj.Files.Item(m.i)
			
			do case
			case !m.Success
				assert FALSE
				Success = FALSE
						
			case inlist(m.obj.Type, FILETYPE_FREETABLE)
		
			
			case inlist(obj.Type, FILETYPE_REPORT)
				compile report (sys(2014, m.obj.name))
			
			case inlist(obj.Type, FILETYPE_REPORT, FILETYPE_LABEL)
				compile label (sys(2014, m.obj.name))
				
			case inlist(obj.Type, FILETYPE_FORM )
				compile form (sys(2014, m.obj.name))
			
			case inlist(obj.Type, FILETYPE_CLASSLIB )
				compile classlib (sys(2014, m.obj.name))
				
			case inlist(obj.Type, FILETYPE_QUERY )
				assert FALSE 
			
			case inlist(obj.Type, FILETYPE_PROGRAM )
				compile (sys(2014, m.obj.name)) encrypt
			
			case inlist(obj.Type, FILETYPE_APILIB )
			
			case inlist(obj.Type, FILETYPE_APPLICATION )
				assert FALSE 
				
			case inlist(obj.Type, FILETYPE_MENU )
				assert FALSE 
				
			case inlist(obj.Type, FILETYPE_TEXT )
			
			case inlist(obj.Type, FILETYPE_OTHER )
			
			endcase
			
			
		endfor
	endcase
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform