Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do form error from application object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00672882
Message ID:
00673326
Vues:
13
thanks for responding,
before the "Do Form" I issue a display memory and display status. all environ variables look right all values in memory look right. I even used a magnifying glass to check quotes. I guess I should tell the whole story (hope Sergey sees this). I run my application executables from another "launching" executable. I have been using VFP6 for both but now I am using VFP7 for the launcher and apps are still VFP6. let me spell out the processing:
user clicks desktop icon
main.prg creates launch app object
main.prg calls app methods appenvir and appdbf then runapp method
the runapp method has the following:
do form
read events
(simplified..I can give details if necessary)
do while not exiting launch app
  do selected application
  close data all
  rerun appenvir and appdbf
  show launch form
  read events
  if(lExit)
    exit
  endif
ENDDO

* release and close everything
RELEASE oAbout,progsel
CLOSE DATABASES ALL
*!*	RELEASE	ALL
CLOSE ALL
QUIT

when user selects from drop down list of available applications
click event stores app exe and its parameter and issues clear events
which returns to the "Do While" process, launches the selected app.
the selected app main.prg is similar to the launch main except the app object name is different. the selected app oapp.runapp method is passed the form name and the "Do Form" generates "Invalid subscript reference".

Unexceptable fix - remarked the runapp method call in the selected application and did the "Do Form" and read event in the main.prg..it works.
I think there may be a stack issue that something is not there that lets the form know it can run. Just guessing. After many days of testing nothing corrects the error except moving the code from the method to the main.prg.
Have I really confused everyone now?
I have 55 applications running from this launcher application with no problems even compiling the launcher in VFP7 . Only 3 are giving this problem. These 3 are the ones I chose to use the application object. the other have the read event in the main.prg

>Hi again,
>sorry my first thought didn't help. I know Sergey asked, and you told him the value of the parameter, but I wondering if you think that's the value or you used the debugger or wait window to see the value?
>
>I know I thought a value was one thing, but upon checking it, it was something else!
>
>Just another thought,
>Julian
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform