Information générale
Catégorie:
Codage, syntaxe et commandes
>>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.
>
>I've used it heavily too. It's a great way to intercept things.
>
>Have you ever tried it with a view set to not send updates? We're using the MereMortals 8.1 class, and it caused us headaches everywhere. I wound up removing the value_assign() from our ctextbox class, and creating a new kctextbox, which was a copy of it, and then added value_assign there. Hoops. Jumping. :-)
No I have not used with a view. I take a different approach to table updates and do not bind the controls to the underlying table/cursor. I assign the controls the values and in the update I perform the SQL Update command in a TRY CATCH block with BEGIN/END TRANSACTION. The CATCH will perform the ROLLBACK in the event of a failure. But I do use the Assign and Access properties a lot particularly with container classes (generally I do not use the control class) to assign/query values of controls within the class.
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