Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveControl is not an object
Message
De
15/09/2000 10:03:42
 
 
À
15/09/2000 09:55:03
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00416840
Message ID:
00416850
Vues:
23
>I am bedeviled by by error 1924 "Active control is not an object". The error occurs in the second line of this code:
>
>substitute="thisform.mypf.page"+ltrim(str(thisform.atpage))
>if vartype(&substitute..activecontrol)='O'
> && put code here to ensure the valid for this control fires.
>
>Can anyone tell me what I need to do to keep from generating error 1924 here. I don't know which control if any has focus. The old Foxpro objnum was much more useful to my way of thinking.

Use TYPE() reather than VARTYPE() - VARTYPE() gets upset referencing unknown objects:

IF TYPE(substitute + '.activecontrol') = 'O'

is a tad slower, but doesn't crash and burn when no activecontrol has been assigned.
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