Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running code can't find form
Message
De
31/10/2001 18:31:44
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
31/10/2001 12:17:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00575726
Message ID:
00575939
Vues:
24
>Hi,
>
>I tried to find some notes on how VFP goes about finding a form or program when it wants to fire it ie. where does it search etc. This is a program trying to find a form within another .exe; here are the details:
>
>- Mk.exe fires up (this is main app for this client)
>- user picks "Reports" from menu which first up FoxFire.app report writer
>
>- within FoxFire, you can run some code at various stages of running a report; in this case, in order to create some data, I call a program named MakeData.prg from a hook in FoxFire; MakeData.prg/.fxp is NOT bound into Mk.exe or FoxFire.app because it changes so much and makes it easier to just update this one file instead of booting everyone out of the .exe to update changes; MakeData.fxp is on the server
>
>- MakeData runs but it tries to call the form AskDates.scx to have the user put in a date range; AskDates cannot be found by VFP; AskDates is included in Mk.exe but somehow VFP still cannot find it; if I put AskDates.scx/.sct up on the server, things are fine but I want to get it (and some other input screens) bound into Mk.exe (my preference)
>
>There must be something in the way that VFP looks back through the call stack and somehow it does not search mk.exe when a .fxp is running; here is the call stack abbreviated to summarize:
>
>Mk.exe
>FoxFire.app
>Makedata.fxp
>tries to call AskDates but cannot find
>
>If you know of a help topic or something in the Hacker's guide, that would also help.

No, but I once had an equivalent problem: a .frx file called a form from within its .dataenvironment.init - and the following didn't work:
- report outside project, form inside, its classlib inside
- report outside project, form outside, its classlib inside

What eventually worked, was
- report outside project, form outside, its classlib outside
- report outside project, form outside based on Fox base classes
- everything inside project.

The first two didn't work even when we tried to use newobject() with the third parameter to create the form from its class (trying to skip the .scx). This was in VFP6 SP3, I think, maybe SP5.

The conclusion I got from this is if you're running anything from outside the .exe and the .vcxes are inside the .exe, the outside code is marooned and can't find almost any of the stuff which is inside the .exe. IOW, bad news for you, unless someone sheds some light on the problem and comes up with the right way to do this.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform