Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active form is not an object
Message
 
À
28/09/1996 12:53:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00008736
Message ID:
00008812
Vues:
35
Hi Michel,

Are you by any chance using this to enable/disable a menu option (in a SET SKIP OF)? (s)

ActiveForm will obviously fail if no form is active, so you have to specifically code for that instance by checking whether _SCREEN.ActiveForm is an object:

IF TYPE("_SCREEN.ActiveForm")="O" AND !ISNULL(_SCREEN.ActiveForm)

... do whatever here
ENDIF

This type of code is crucial if you have toolbar events that fire on forms that are expected to be open. My guess is that somewhere in your code a menu option is not disabled when there's no form active.

VFP 5.0 has a forms collection that makes this a little cleaner to deal with.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform