Hi, all -
We have a very interesting little problem, which we can replicate. I was wondering if anyone else can verify that this is happening...
There is a (baseclass) combobox, named "Combo1" on a (baseclass) form. It is the only control on the form.
Combo1.When:
RETURN .F.
Combo1.Init:
LOCAL ln1, lc1, i
CREATE CURSOR cTemp1 (x C(10))
FOR i = 1 TO 20
APPEND BLANK
REPLACE x WITH 'Value ' + ALLTRIM(STR(RECNO()))
NEXT i
ln1 = 3
SCAN
this.AddItem(x)
IF RECNO() = ln1
lc1 = x
ENDIF
ENDSCAN
GO TOP
this.Value = lc1
this.Refresh()
Next, we run the form.
I would expect that the value of Combo1 cannot change, since the When( ) method returns false. This is not the case. The user can click on the center of Combo1, then drag out of Combo1 (either up or down). This changes the value, a little. Usually only a few values up or down.
This is very scary behavior, as we have hundreds of forms with comboboxes on them, and the default behavior of the framework we are using is to have:
RETURN thisform.editing
in the When clause of all objects, and to only allow editing at certain times.
Can anyone else replicate this (assumed) bug?
BTW, this behavior can be replicated in the following versions of VFP:
Visual FoxPro 06.00.8862.00 for Windows [May 11 2000 08:51:23] Product ID 82898-815-2171467-96032
Visual FoxPro 07.00.0000.9465 for Windows [Jan 4 2002 02:58:33] Product ID 55181-015-6159696-03285
Visual FoxPro 08.00.0000.2021 for Windows [Aug 21 2002 12:54:57] Product ID 55181-270-5446961-03615
Thanks for looking.
- George