Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Value_assign method
Message
From
08/10/2020 15:15:58
 
 
To
08/10/2020 12:38:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01676509
Message ID:
01676515
Views:
30
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform