Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional GetFldState Excluding Specific Fields
Message
De
26/07/2001 09:59:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
26/07/2001 09:42:45
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00535632
Message ID:
00535647
Vues:
10
>Ok, I have ended up with a situation that I'm not sure how to handle. I have four Comboboxes which use a compare of the original value to the current value to determine if a change has been made (cFieldState). This is due to what I consider a limitation Combobox behaviour, namely that it thinks the value has changed whether it actually has or not. On the same form I have other objects that are not Comboboxes. I normally use GetFldState to determine if there were changes, but now need to use it in conjunction with the value compares to know whether to handle for changed data. Two scenerios of this:
>
>Not coding for the Combobox state
>
>If '2' $ getfldstate(-1) and thisform.cFormMode $ 'C'
>   Do something
>Else
>   Do nothing
>Endif
>
>
>Coding only for the Combobox state
>
>If ThisForm.cFieldState = .T. and thisform.cFormMode $ 'C'
>   Do something
>Else
>   Do nothing
>Endif
>
>
>Since the Comboboxes always return a 2 whether they have changed or not, how to combine the two so that I ONLY check for the GetFldState of the fields which are NOT tied to the Comboboxes? FYI, there are many fields for the view. Or another idea? Thanks!
>
>Regards, Renoir

Renoir,
GetFldState() in itself hard to use IMHO. You might keep a form level property say RecOnEntry and before you start editing :

scatter name thisform.RecOnEntry

In place of GetFldState :
scatter name loCurrent
llModified = !compobj(thisform.RecOnEntry,loCurrent)

Cetin
Ç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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform