Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
App hangs
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01323514
Message ID:
01323868
Views:
14
BTW, should it be

RELEASE ALL EXCEPT lcServer, oLaunch

?

Otherwise I don't understand how oLaunch can survive and why do we need to check its type.

>Hi Doug,
>
>There are no top level forms. It hangs when I try to set procedure or set classlib. Here's the code: The wait window with set('procedure') never runs. It will run if I hardcode the path, but I thought procedures and libraries were compiled into the app, making the paths unnecessary.
>
>Jim
>
>* main.prg
>#Define APP_DIRECTORY 'eis9'
>
>Local lcServer && Universal Naming Convention (Root directory name)
>
>Release oApp
>
>Close Database All
>
>Release All Except lcServer
>lcServer = 's:\'
>
>Clear Windows
>Clear
>If Wexist('project')
> Hide Window 'project'
>Endif
>
>If Vartype(oLaunch) = 'O'
> lcServer = oLaunch.ServerName
>Endif
>
>If Vartype(oLaunch) = 'O'
> tcdrive = Left(oLaunch.AppNetworkPath, 2)
>Else
> tcdrive = 's:'
>Endif
>
>*-- Set up the path
>cNewPath = ''
>cTempPath = tcdrive + '\vfpapps\' + APP_DIRECTORY + '\data'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\' + APP_DIRECTORY + '\prog'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\' + APP_DIRECTORY + '\log'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\share\data'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\shardata\lookup'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\foxapps\mail\data'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\eis9\data\shars'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\insure\data'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\eis9\compliance'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\eis9\compliance\monthly'
>cNewPath = cNewPath + cTempPath
>cTempPath = ';' + tcdrive + '\vfpapps\eis9\compliance\annual'
>cNewPath = cNewPath + cTempPath
>Set Path To (cNewPath)
>Release cTempPath, cNewPath
>WAIT WINDOW "Path"
>* Open procedure files and class libraries
>Set Procedure To c_app, c_security
>WAIT WINDOW Set("Procedure")
>Set Classlib To Controls, eis, Forms
>WAIT WINDOW Set("Classlib")
>* Instantiate application object
>Public oApp
>oApp = Createobject('cApp', lcServer)
>WAIT WINDOW "APP"
>Release Procedure c_app && we won't need proc lib any more
>
>If Vartype(oApp) <> 'O'
> Return
>Endif
>
>>Hi James.
>>
>>>I have an app that I created that runs fine when I call it through the command window, but it hangs when I try to run it through a launcher exe. This launcher exe runs other apps fine; it's just this one that I'm having the problem with. It hangs when I do a set classlib or set procedure, or when I try to use newobject(). It's almost as if the paths are necessary for this to run, but I thought the procedures and classlibs were compiled into the app.
>>
>>Does the app run in a top-level form with _SCREEN.Visible set to .F.? If so, perhaps a dialog is coming up in _SCREEN, which you can't see, waiting for input. As a result, it looks like the app has hung. It could be a "locate file" dialog, for example, on NEWOBJECT() or SET CLASSLIB if the file can't be found.
>>
>>Doug
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform