Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Spinner
Message
 
 
À
29/07/2006 12:16:40
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01141401
Message ID:
01141522
Vues:
18
>>>
>>>In some cases it might be. However if a routine update is needed to underlying source no need to mess with iac.
>>>PS: I read about dodefault, it would do default anyway unless supressed by nodefault (IOW sometimes it means you're doıng the default twice).
>>>Cetin
>>
>>So far, I have tracked the problem to the fact that in the InteractiveChange the value of the field bound to this control does not change. The value is being updated because when I save the record the value from spinner is updating the field. I tried putting DODEFAULT() and removing DODEFAULT() but to no avail.
>
>But I meant why you need code there.

Cetin,

Here is the reason I have code in InteractiveChange method of the spinner. Imagine three controls on a form: a Spinner to show Quantity, a Textbox to show Unit Price and a Textbox to show Extended Price. User enters Unit Price and then clicks in the Spinner control clicking mouse on Up or Down wheel. As he/she changes the quantity I want to show the Extended price, obviously as a product of unit price and quantity. So I put the following simple code in the InteractiveChange:
replace EXT_PRICE with UNIT_PRICE * QUANTITY in V_MYVIEW
The above didn't work so I changed the code to use the Value of the Spinner and it work now.
replace EXT_PRICE with UNIT_PRICE * this.value in V_MYVIEW
I wish I can understand why using the field value of the field bound to the Spinner didn't work.

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform