Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VMP: Child cursor filter
Message
De
13/11/1999 22:11:17
 
 
À
13/11/1999 21:14:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00291019
Message ID:
00291049
Vues:
25
>I'm reposting, as part of the message was missing for some reason...
>
>What should the syntax be for a filter that is applied to a child cursor when the filter contains a reference to an object on the form?
>
>I can get the filter to work by using SET FILTER TO plan_code = thisform.pgfpagerefresh1.page5.lstplantype.value, but I get an error when cancelling the form when the cusPushPopRecNo.Destroy method is run. The command IF !eval(filter(.icSaveAlias()) in this method errors with "Object is not contained in a form.". I have tried using SET FILTER TO _Screen.Activeform.Pgfpagerefresh1.Page5.LstPlanType.Value. The filter works, but I get a syntax error on the same line in the cusPushPopRecNo.destroy method.
>
>It seems I need to somehow get the object reference of the form that I'm cancelling from in the filter command, but I can't seem to get the syntax right. Any ideas?
>

The problem is that the cursor exists independent of the form - for example, if you have a private datasession, and you pop a modal form that shares that datasession, if anything causes the cursor to reevalutred (ie moving the pointer), thisform will not resolve correctly.

If you want to use an object reference in a filter, you need to create a reference to the object that exists independently - maybe a property in a global object like your oApp, so that the reference can be evaluated even when the focus of the application shifts.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform