Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 7 code that doesnt run in 8
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00771062
Message ID:
00771158
Vues:
12
It seems that in both 7.0 and 8.0 this is a hidden or protected property of _VFP.activeproject.
Initially .files does not appear in the debugger.
But if you do something like
x= _vfp.ActiveProject
? TYPE('x.files[1]')
? TYPE('x.files[1].name')
? x.files[1].name
it does appear.
Now that there is a collection class either exposed or new in VFP 8 perhaps they have changed the way it works internally.
Have you tried the old way of
FOR i = 1 TO ALEN(_VFP.activeproject.files)
ENDIF
?


>Can anyone tell me why this code doesnt work in VFP 8 when it used to run fine in 7.0 ?
>
>
>WITH _VFP.ACTIVEPROJECT
>
>> FOR EACH oFile IN _VFP.ACTIVEPROJECT.FILES
> cDir = JUSTPATH(oFile.NAME)
>
>
>{Other Code}
>
>I use this code to setUpPaths for a project so I can run the Main prg and avoid compiling an exe in development mode.
>
>The line demarcated with a '>' above gives an error this error:
>
>'Property FILES is not found'
>
>There is only 1 project open at the time I run this code. Like I said it used to work just fine on any Project in VFP 7 !
>
>Is this some sort of projecthook issue ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform