Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another Cheezy Tip of the Week (VFP6)
Message
De
12/07/1998 21:38:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00116665
Message ID:
00116667
Vues:
13
Hi Barbara --

>Great idea, John, but I think your EditValue_assign method will have to be a CASE statement with an entry for each value of tNewVal.
>
>This is a good way of combining code that is presently on 'your' Edit, Save, Cancel and Add buttons.
>

Whoops....you are right, of course. The amended code is below:
LPARAMETERS tNewVal
THIS.EditState=tNewVal
DO CASE 
CASE tNewVal=0   && No edit state
   ***--- Code for not editing and not adding
CASE tNewVal=1   && Editing
   THIS.SetAll("Enabled",.T.)
   THIS.Refresh()
CASE tNewVal=2
   INSERT INTO table (field) VALUE (value)
   ***--- More append code
ENDCASE
Thanks for pointing out my ommission!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform