Yes there's a standard way that we recommend. It's better to load all libraries on startup, rather than for each use - SET PROCEDURE/CLASSLIB has overhead even if libraries are already loaded so generally one wants to avoid this for each hit.
Basic approach: Put into YourApp.OnLoad() (YourAppMain.prg) to set all SET PROCEDURE ADDITIVE/SET CLASSLIB commands.
Better approach, create a LOAD_MyApp.prg called from YourApp.OnLoad(). Inside put all SET PROCEDURE/SET CLASSLIB commands you need including DO wconnect. Besides loading all references in your app it's also a quick way to set up a test environment where you can load up all classes needed to test individual classes or helpers of your application and Web Connection.
As mentioned I tend to do this for all my apps of consequence, desktop as well as Web to
+++ Rick ---
I'm running WWWC 5.60. Most of the class libraries are referenced in wconnect.prg and wconnect.h, but wwFTP is absent. So I'm using a 'SET PROCEDURE TO wwFTP ADDITIVE' immediately before 'oFTP = CREATE("wwFtp")'. It works but seems to break convention. Is there a better approach?
Rick Strahl West Wind Technologies Where do you want to surf today? | Reader Version: 5.0 |
from Maui, Hawaii