Re: How does VFP locate class libraries during runtime?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Exactly as I said, with one difference.

If your class was defined in a .PRG, the search path will include the method
you've specified first, looking for the DEFINE CLASS. Then the SET CLASSLIB
order kicks in.

--
Fred
Microsoft Visual FoxPro MVP


"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4E9731B1-DF42-426C-ACA2-E601E7AC9B7E@xxxxxxxxxxxxxxxx
> Hi Fred,
>
> The search order I'm referring to is something like this:
>
> When you issue the DO command with a procedure name, Visual FoxPro
> searches
> for the procedure in the following order:
>
> 1. The file containing the DO command.
> 2. The current database.
> 3. Procedure files opened with SET PROCEDURE.
> For more information, see SET PROCEDURE Command.
> 4. Program files in the execution chain.
> Visual FoxPro searches program files in order from the most recently
> executed program to the first program executed.
> 5. A standalone program file.
>
> If a matching program file is found, Visual FoxPro executes the program.
> Otherwise, Visual FoxPro generates an error message.
>
> To execute a procedure in a specific file, include the IN clause in the DO
> command.
>
>
>
> "Fred Taylor" wrote:
>
>> Sure. When you do SET CLASSLIB TO, you either provide a list of .VCX
>> files,
>> or you can append to the list by using the ADDITIVE keyword. The order
>> they
>> appear in the list is the order they're searched in.
>>
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:7685DA37-F943-480E-AE58-598C57E071C4@xxxxxxxxxxxxxxxx
>> > Hi Fred,
>> >
>> > Is there a search order for vcx like the search order for procedure?
>> >
>> > Thanks,
>> >
>> > Peter
>> >
>> > "Fred Taylor" wrote:
>> >
>> >> You can use SET CLASSLIB TO command to control the order. and it will
>> >> also
>> >> make a difference if the form is external to the .EXE or not. If it's
>> >> internal, it use what's in the .EXE, otherwise it will use the path.
>> >>
>> >> --
>> >> Fred
>> >> Microsoft Visual FoxPro MVP
>> >>
>> >>
>> >> "Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:B51F6790-1283-4852-9D99-8CF3BCBB4F4D@xxxxxxxxxxxxxxxx
>> >> >I have a question about how controls locate their class libraries
>> >> >during
>> >> > runtime. If I have 2 exes (main.exe and module.exe) which use
>> >> > custom.vcx
>> >> > but
>> >> > the two custom.vcxs are not the same, how does VFP know which
>> >> > custom.vcx
>> >> > to
>> >> > use when running a form which has controls from custom.vcx of the
>> >> > module.exe?
>> >> >
>> >> > 1. Does it matter whether the form is included or excluded in the
>> >> > project?
>> >> > 2. Can we control how VFP locates the class libraries?
>> >> >
>> >> >
>> >> > Thanks,
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


.



Relevant Pages

  • Re: How does VFP locate class libraries during runtime?
    ... The search order I'm referring to is something like this: ... When you issue the DO command with a procedure name, Visual FoxPro searches ... The file containing the DO command. ... Program files in the execution chain. ...
    (microsoft.public.fox.helpwanted)
  • Re: How does VFP locate class libraries during runtime?
    ... >> Visual FoxPro searches for the class or OLE object in the following ... Classes in procedure files opened with SET PROCEDURE ... Program files in the execution chain. ...
    (microsoft.public.fox.helpwanted)
  • Re: How does VFP locate class libraries during runtime?
    ... Visual FoxPro searches for the class or OLE object in the following order: ... Classes in procedure files opened with SET PROCEDURE ... The file containing the DO command. ... Program files in the execution chain. ...
    (microsoft.public.fox.helpwanted)
  • Re: How does VFP locate class libraries during runtime?
    ... Microsoft Visual FoxPro MVP ... Classes in procedure files opened with SET PROCEDURE ... The file containing the DO command. ... Program files in the execution chain. ...
    (microsoft.public.fox.helpwanted)
  • Re: Active X Controls show as "2" files in Downloaded Program Fold
    ... Program Files", otherwise that error message will appear. ... If you deleted and recreated the folder, then you will need to follow the ... at a command prompt for the full set of options] ...
    (microsoft.public.windowsxp.general)