Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't call setfocus() from init() ??????
Message
De
30/01/2003 14:19:47
 
 
À
30/01/2003 13:56:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00747302
Message ID:
00747321
Vues:
16
I now realize why I am getting this error. Although I am getting it in my form's init. I am calling the form itself (a modal form) from within the valid of another (modal) form. I don't know if being modal has anything to do with it.



*-- this code is being called from the valid of a textbox
*-- I don't understand why VFP doesn't understand the context here
*-- the setfocus() occurs in the init() of
*-- the icmkitlookupplacement form
if seek(this.value,'kit_child','cplacement')
return .t.
else
do form (FORMSPATH+'icmkitlookupplacement') with this.value to lcRetval
if vartype(lcRetval)='L'
*-- don't do anything
else
this.value=lcRetval
this.refresh()
endif
endif







>I am receiving the error:
>
>Cannot call setfocus() from within a when, valid, rangehigh or rangelow.
>
>BUT - I am calling the setfocus in my form's init() method!!
>This has me COMPLETELY confused. I always call setfocus() from my form's init. How can this be happening?
>
>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform