Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't call setfocus() from init() ??????
Message
From
30/01/2003 14:19:47
 
 
To
30/01/2003 13:56:43
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00747302
Message ID:
00747321
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform