Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing Files to be included
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01150561
Message ID:
01150573
Views:
27
Thanks Hank,

EXTERNAL FILE is what I was looking for.

I've never used this before and didn't realize that this existed actually, but I figured it must be there somewhere...

Thanks,

+++ Rick ---

>Hi Rick,
>
>what we do is add a method to our oApp object that runs in our apps. This method never gets called. In the project-specific subclass of that method (which Frank Camp named "AddToProjectSucker") we have calls like
>
>
>do form xyz
>external class <classlib>
>external file xyz.js
>do xyz.prg
>
>
>etc.
>
>Anything that doesn't have an explicit call gets added (but not the secondary calls).
>
>If the PJX gets hosed, this allows the project to rebuild successfully.
>
>In your case, you could AddToProjectSucker or equivalent to the class you are distributing. You can put an IF .F. around it, of course, in case the consumers get the urge to call the method.
>
>hth,
>
>Hank
>
>>Hi all,
>>
>>I'm trying to figure out a way to reliable cause external files to be included into a project, but without having any control over the project (ie. can't use project hooks). The idea is that if somebody wants to use a class the associated resources get loaded into the project automatically just by including the class.
>>
>>I've found some ways to make this happen but it's all ugly as sin <g>. Basically I can add code like this:
>>
>>SET PROCEDURE TO MyJavaScriptResource.js
>>SET PROCEDURE TO WebImage.gif
>>
>>and then never call this code.
>>
>>This actually works - the resources get included BUT the VFP compiler throws warning exceptions and creates a .ERR file at least for the JS file (oddly the compile completes though and the BUILD EXE reports 0 errors which seems strange - apparently the compile errors in non PRG files are ignored).
>>
>>Does anybody know of other ways that the VFP compiler will include external files explicitly?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform