Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cycling down Project Collections - Code Samples
Message
From
18/02/2008 08:40:43
 
 
To
18/02/2008 08:34:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01293412
Message ID:
01293417
Views:
17
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform