10-19-2023, 02:14 PM
The problem with UDTs and sorts is exactly which element of the UDT are you trying to sort by? If you're getting to the point where you need to sort like that, then you need to check out my old QBDbase stuff. It allows sorting across multiple elements in a UDT, so you can set priority on which element takes precedence over what other ones.
As for remembering the codes, the easiest way there is to set a CONST to a helpful name and use it. CONST Absolute_Coordinate, Absolute_Center, Auto_Resize, Relational_Coordinate, Relational_Center....
The main problem I have with using UDTs as parameters is that values tend to accidently bleed over from one call to the next, as folks won't fill out each and every value before making the call.
"All I need is X/Y and center... I can skip this other stuff!"
.... compile and run later....
"WTH! Why isn't this working as I expected?!!"
As for remembering the codes, the easiest way there is to set a CONST to a helpful name and use it. CONST Absolute_Coordinate, Absolute_Center, Auto_Resize, Relational_Coordinate, Relational_Center....
The main problem I have with using UDTs as parameters is that values tend to accidently bleed over from one call to the next, as folks won't fill out each and every value before making the call.
"All I need is X/Y and center... I can skip this other stuff!"
.... compile and run later....
"WTH! Why isn't this working as I expected?!!"