Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class library not found
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00767675
Message ID:
00767863
Vues:
14
>>>>>>>I believe I asked this in the past, but never found the cause, or fix it...
>>>>>>>What may be the cause, when running a compiled EXE with all class libraries included, to get this error?
>>>>>>>Typically it pops when starting a form, and it says:
>>>>>>>
>>>>>>>Error loading file – record number 19. FormName or one of its
>>>>>>>members. Parent: Class library file
>>>>>>>‘x:\foxv\...\LibName.vcx’ is not found

>>>>>>>
>>>>>>>Record 19 in the SCX file is the form object record.
>>>>>>>
>>>>>>>We are running VFP 8 on Win XP.
>>>>>>>TIA
>>>>>>
>>>>>>My guess is that you haven't included the class (LIBNAME.VCX) file in your project file, so it is not compiled into the EXE. If you were to put the VCX file in the search path it should work as well...
>>>>>>
>>>>>>Hope this helps!
>>>>>
>>>>>Thanks Andrew,
>>>>>It doesn't help however... As I stated, ALL class libraries ARE included in the project.
>>>>>
>>>>>>
>>>>>>Andrew
>>>>
>>>>
>>>>Open up your form as a table and check the location of the .VCX in question in all records in the CLASSLOC field. You may have had 2 copies you were working from and didn't know it.
>>>
>>>Thanks Fred,
>>>It is just one record - the form record - and the location is, and always was '..\..\classes\LibName.vcx'. The users don't even see that directory, and the library is included in the project. The error is not consistent, it happens once in a blue moon, but there are days when you may get it two times in a row going out of VFP and back in.
>>
>>Are there other controls in this classlib? If there are, you may have some other forms that are using these controls, and THEY may be the ones with the wrong CLASSLOC field.
>
>This library contains only form classes. The form classes use controls in other libraries. All our libraries are in one folder, '..\..\classes\'.
>BUT:
>1. All the EXEs run fine 99% of the time, when the error happens, it is before the user does anything on the forms, the form never gets instantiated.
>2. Users do not see the classes folder - this is set at the network level. Why would user need to go to the folder, since classes are included in the EXE? If you have the class lib included in the project, does the path play any role? I actually wonder... When the user starts an application, it is from an applications menu that starts each EXE - In the main program of each EXE we use
>oApp = NEWOBJECT('appClass','classLibrary',...other parameters)
>There is NO PATH here.
>But the ClassLoc field of the .SCX contains the relative path, i.e. '..\..\classes\' Could that be a problem? If yes, what do you do about it?

>
>
> VFP caches the classlib references, so once it's gone on to the wrong one, it may stay that way for awhile, causing your problem. I've seen similar problems as you've seen and it's ALWAYS been this situation, duplicate classlibs in different folders, and classes referencing the wrong ones.
>
>I am very suspicios about anything related with memory cache, but how can the wrong library get cashed when all classlibs are included in the projects, and no user can see the folder where all our classes are stored?
>
> In the development environment, it was even worse, because you'd not see the changes YOU KNOW you just made. Some forms would work correctly with the changes, and others wouldn't.
>
>Yes, this happens to us too, but this seems easier to explain.
>
>Just about drove me nuts!
>
>Exacltly how I feel!

Well, I don't know what to tell you then. We've always used several .VCX libraries with just form classes in them, but have never had any problems with those. However, there is no relative pathing in them either. All of our class libraries were in the same folder, so never had a problem. I notice you're trying to go UP your hierarchy to 2 levels above. Maybe that's causing VFP's confusion. Could you possibly try moving all of your class libraries into the same folder and rebuilding and see if that helps? You might be better off going down the hierarchy (below your current folder) rather than than trying to go up.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform