>*Get Link to this hook (THIS does not respond, must not be active since controled by code) >*TAG is THIS.TAG = SYS(2015) in Init event >FOR lnLoop2 = 1 TO _VFP.PROJECTS.COUNT > IF TYPE('_VFP.Projects(lnLoop2).PROJECTHOOK')='O'; > AND !ISNULL(_VFP.PROJECTS(lnLoop2).PROJECTHOOK); > AND _VFP.PROJECTS(lnLoop2).PROJECTHOOK.TAG=THIS.TAG THEN > loProject = _VFP.PROJECTS(lnLoop2) > EXIT > ENDIF &&TYPE('_VFP.Projects(lnLoop2) ... >ENDFOR &&lnLoop2 > >FOR lnFile = 1 TO loProject.FILES.COUNT > loFile = loProject.FILES(lnFile) > ... >>
FOR EACH loFile IN APPLICATION.ACTIVEPROJECT.FILESwhich has been working for years. Now I get a 'Property FILES not found' error on this line. The debugger shows Application.Project appears to be the valid and correct project; .FILES is an object but .FILES.Count gives 'Expression could not be evaluated'. This isn't project specific - I get the identical error in another project. Also, at least AFAICS, there's no #INCLUDE that could mess this up and if I step out of the code the project opens normally with all files listed.