Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't build a second time
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00980994
Message ID:
00981005
Vues:
43
>I seem to remember something similar to this and I think the work-around I found was to add several new lines in my code (empty lines empty space) and then build. I know it sounds crazy but I swear it solved my problem at the time. If I recall correctly it happend while I was building the MTDLL I used for an ActiveVFP web application (www.TaskASAP.com). I also think it was someone here on UT who gave me the suggestion to try adding empty lines.

I have found where the problem is. But, this makes absolutely no sense.

This is the top part of my initialization code:
PARAMETERS tcParameter

CLEAR ALL
CLOSE ALL

* We maximize the window if it is not already maximized
IF _screen.WindowState<>2
   _screen.WindowState=2
ENDIF

* We disable the close button
_screen.Closable=.F.

* DECLARE DLL statements for reading/writing to private INI files
DECLARE INTEGER GetPrivateProfileString IN Win32API;
  String cSection,String cKey,String cDefault,String @cBuffer,;
  Integer nBufferSize, String cINIFile

DECLARE INTEGER WritePrivateProfileString IN Win32API;
  String cSection,String cKey,String cValue,String cINIFile

* DECLARE DLL statements for reading/writing to system registry
DECLARE Integer RegOpenKeyEx IN Win32API;
  Integer nKey,String @cSubKey,Integer nReserved,;
  Integer nAccessMask,Integer @nResult

DECLARE Integer RegQueryValueEx IN Win32API;
  Integer nKey,String cValueName,Integer nReserved,;
  Integer @nType,String @cBuffer,Integer @nBufferSize

DECLARE Integer RegCloseKey IN Win32API ;
  Integer nKey

* DECLARE DLL statement for Windows 3.1 API function GetProfileString
DECLARE INTEGER GetProfileString IN Win32API;
  String cSection, String cKey, String cDefault,;
  String @cBuffer, Integer nBufferSize

* DECLARE DLL statement to get the user logged into the network
DECLARE INTEGER GetUserName in WIN32API String @,Integer @

* gaLangue    Language field names in TABLE.DBF, TAG.DBF, etc.
* gaLangueKey Key field in MESSAGE.DBF
PUBLIC ARRAY gaLangue[2],gaLangueKey[2]
gaLangue[1]='FRANCAIS'
gaLangue[2]='ANGLAIS'
gaLangueKey[1]='French'
gaLangueKey[2]='English'

* Only the Master class will set up the environment. So, in order to assure an ongoing open
* of the Message.dbf table, we need to force SET EXCLUSIVE OFF at this level.
LOCAL lcOldSetExclusive
lcOldSetExclusive=SET('Exclusive')
SET EXCLUSIVE OFF

* Open the message table as we need it at this level
USE GetIni('System','Data',CURDIR()+'Main.ini')+'\Data\Admin\Message'

SET EXCLUSIVE &lcOldSetExclusive

* Detection of another instance
SEEK PADR('OPENIT',LEN(Message.Module))+PADR('SYSTEMNAME',LEN(Message.Cle)) ORDER ModCle
IF CheckWin(ALLTRIM(Anglais))
   MESSAGEBOX('You can only have one instance of this application in memory.',48,ALLTRIM(Anglais))
   CANCEL
ENDIF

* Pour les rapports en landscape
_ASCIICOLS=400

* Set the libraries
DO CLASSLIB IN CUSTOM

* Clear the screen
CLEAR

* Loading form
Loading=CREATEOBJECT('About')
Loading.SystemName.Caption=ALLTRIM(Anglais)
SEEK PADR('OPENIT',LEN(Message.Module))+PADR('VERSION',LEN(Message.Cle)) ORDER ModCle
Loading.Version.Caption=ALLTRIM(Anglais)
Loading.NameIni='UPROPOS'
USE IN Message
Loading.Show()

* This is a workaround to have the images being cached so the transparency of the GIF files will work
* on buttons.
LOCAL loImage,loImage2,loImage3,loImage4,loImage5,loImage6,loImage7
LOCAL loImage8,loImage9,loImage10,loImage11,loImage12,loImage13,loImage14
LOCAL loImage15,loImage16,loImage17,loImage18,loImage19,loImage20
LOCAL loImage21,loImage22,loImage23,loImage24,loImage25
loImage=CreateObject('Image') 
loImage.Picture='First.gif'
loImage2=CreateObject('Image') 
loImage2.Picture='Next.gif'
loImage3=CreateObject('Image') 
loImage3.Picture='Previous.gif'
loImage4=CreateObject('Image') 
loImage4.Picture='Last.gif'
loImage5=CreateObject('Image') 
loImage5.Picture='New.gif'
loImage6=CreateObject('Image') 
loImage6.Picture='Open.gif'
loImage7=CreateObject('Image') 
loImage7.Picture='Delete.gif'
loImage8=CreateObject('Image') 
loImage8.Picture='Save.gif'
loImage9=CreateObject('Image') 
loImage9.Picture='Undo.gif'
loImage10=CreateObject('Image') 
loImage10.Picture='Close.gif'
loImage11=CreateObject('Image') 
loImage11.Picture='FirstDisable.gif'
loImage12=CreateObject('Image') 
loImage12.Picture='NextDisable.gif'
After this, if I put a return, the application will simply terminate. This is working fine. If the return is there, I can build as many times I wish, run the app and build again.

But, if I add two lines:
loImage13=CreateObject('Image') 
loImage13.Picture='PreviousDisable.gif'
and have a return after, I will not be able to build another time and the VFP interface will simply freeze. I have to kill the application and start VFP again.

Anyone have any idea about what is going on here?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform