Information générale
Catégorie:
Codage, syntaxe et commandes
>Have you any of you used value_assign() with view fields? It seems to really not work well with VFP.
>
>We had an app where I added value_assign() to handle some automatic field encryption, and in the process it broke a dozen other things or more. We wound up having to create a separate class for encryption and put value_assign there and not use it on the original class because places where read-only views are specified into those textbox controls, it was thinking the data had changed and was generating the error 2072 -- Cursor cannot be modified because it contains an unsaved record.
>
>Seems to me to be a bug in VFP, but one we've had to workaround regardless.
>
>Anybody else seen this?
I have used Assign and Access indirectly with the value field. I created a new property on my textbox class for numeric values (Amount) with the Access and Assign methods. These would set or query the Value for a numeric. The Assign would format the display Value property based on number of decimals, comma separator, and monetary symbol. The Access method would strip the formatting and return a numeric value from the Value property. This has worked without any problems.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement