Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help! Can not establish reference to field on SDI Form
Message
De
25/10/2001 11:01:58
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/10/2001 03:50:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00573053
Message ID:
00573207
Vues:
27
This message has been marked as a message which has helped to the initial question of the thread.
>The hacked about function below does not work as expected when it is called by an external program.
>
>I like to use a simple function that outputs a message to my users in a convenient way.
>
>eg QMESS('This Order is ready for dispatch')
>
>The function will check if there is a field on the active form called Qmess and if there is it will output to that field. If there is no field by that name it displays the message using WAIT WINDOW instead.
>
>It is very handy for displaying status messages to users as a process operates.
>
>Foe some reason, if I call a program from my Top Level form which in turn uses this function to display something on the form, output does not go to the Qmess field on the form.
>
>This does not seem to be a problem if the VFP desktop is visible.
>I would have expected _screen.activeform to work with a top level form but it did not do the trick so I commented it out and replaced it with code based on _vfp.forms.item as you can see below.
>The code below seemed to work when calling Qmess('My Message') from the command window but stopped working with no VFP desktop visible.
>
>The function works great as a method of the form but I want to keep it in my proc lib and call it from programs external to the form so that is not an option form me.

One thing may be that with _screen.visible=.f., wait window won't. Not sure if this holds with each version of VFP. The other may be that your parsing _vfp.forms doesn't find the top level form, which is strange.

IMO, it should work from a form if you call it as QMess(cMessage, this). To find out why doesn't it find your form when you call it from a .prg, you'd have to trace it, and specially to put _vfp into the watch window, and see its forms collection - could be the collection doesn't behave as expected.

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