Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This.Value = This.Value
Message
From
23/10/1998 12:20:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/10/1998 11:47:46
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00149804
Message ID:
00149892
Views:
50
Hi Jim & Ed,
VFP6 ? (not lucky to use yet).
I didn't notice ListItemID before (other things hit me before and I include this code in all combos). Thanks for the info Ed.
Agree Jim, wish MS will learn to document like Borland some day :)
Cetin

>Hi Ed,
>
>So VFP 6 has made *no* difference to this situation???
>
>One could hardly expect a person to code this way, except with the knowledge beforehand. Since I contend that the majority of people who "try" VFP *never* get on to any WEB service anywhere to get help to bail out of difficulties, it is not surprising that so many declare it 'too hard' and just give up. It is *not* that it is that 'hard', but just tooo hard to make work as documented, given this kind of stuff.
>
>Regards,
>
>Jim N
>
>>>>I found a interesting bug in VFP, which can be solved by the apparently redundant sentence THIS.VALUE=THIS.VALUE. To show the bug:
>>>>
>>>>CREATE a table with a numeric field and a text field.
>>>>
>>>>APPEND a record to it
>>>>
>>>>Create a blank form, and include the table in its environment.
>>>>
>>>>Add a spinner to the form; set its ControlSource to the numeric field, and in its INTERACTIVECHANGE code write THISFORM.REFRESH().
>>>>
>>>>Add a textbox to the form; set its ControlSource to the text field, and in its REFRESH code write THIS.VALUE = STR(THISFORM.SPINNER.VALUE).
>>>>
>>>>Run it, and try to change the spinner by clicking on its arrow buttons!! What I get is: the spinner changes for an instant, and goes back to its original value. (This doesn´t happen if the objects have no ControlSource.)
>>>>
>>>>The solution? Add THIS.VALUE=THIS.VALUE at the beginning of the SPINNER.INTERACTIVECHANGE code.
>>>>
>>>>Weird!!
>>>Hi Federico,
>>>FYI this behaviour is not dedicated to spinners. Textboxes, combos etc behave the same way and in grids beforerowcolumnchange event data validation checks need a this.value = this.value for currentcontrol. Another weird situation :
* combo.lostfocus
>>>this.value = this.displayvalue
>>>this.displayvalue = this.value
might be lifesaver in editable lookup combos.
>>>Cetin
>>
>>This is also requrement for safe usage of non-editable, even unbound combos if you're going to use Combo.ListItemId property.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform