Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Start method of the application object
Message
From
17/05/2021 13:41:11
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01680506
Message ID:
01680507
Views:
37
>Hi,
>
>I am looked at the error log and the images that the error routine creates when an error occurs. And everywhere where the application cannot find the file password.fxp, the screen image shows that the application was not loaded yet (not tool bar or menu appear). Sometimes just the application main windows without any toolbar or menu. The error log ends (as far as Stack Level) with the call to APPLICATION_SETUP.START (before it goes to the ERROR_MANAGER.ERRORHANDLER). And the main PRG does have a code
>
>oApp.start()
>
>The code in application class START method is as follows:
>
>PROCEDURE Start
>	do while .T. 
>		read events
>              *-- method .cleanup() closes all open forms.
>		if this.cleanup()
>			on shutdown
>                     *-- Method cleanup2() does basically nothing. Just two lines:
>                     *-- POP MENU _MSYSMENU TO MASTER
>	              *-- SET SYSMENU TO DEFAULT
>			this.cleanup2()
>			if type('oPassword') = 'O' .and. !ISNULL( oPassword )
>				oPassword.Close_user_login_file()
>				oPassword.destroy()  
>				oPassword = .NULL.
>				release oPassword
>			endif
>			exit
>		endif
>
>	enddo
>
>
>My understanding that on the Start of the application the code does not go below the line READ EVENTS above. So, the Cleanup() and cleanup2() should not really affect the start.
>
>Anybody see what could be wrong in the code above? Or what IS wrong in the code above?

I see no reason why you have a DO WHILE .T. loop. I don't see why that would cause your problems, but I also don't see the point of it.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform