07-09-2024 06:42 AM
Well this is annoying:
I can't think of a reason why they disallowed writing to the text properties of a string control when it's in a strict typedef.
07-09-2024 06:51 AM
07-09-2024 07:21 AM
@GerdW wrote:a strict typedef also defines cosmetics of the frontpanel element, so it makes no sense to start to edit those cosmetics at runtime.
To me, text selection is part of the functionality of a string, nothing to do with cosmetics.
This should be writable even for a strict typedef-ed control.
07-09-2024 08:56 AM
Hi raphschru,
@raphschru wrote:
@GerdW wrote:a strict typedef also defines cosmetics of the frontpanel element, so it makes no sense to start to edit those cosmetics at runtime.
To me, text selection is part of the functionality of a string, nothing to do with cosmetics.
This should be writable even for a strict typedef-ed control.
Most use cases for text selection (IMHO) are about text formatting (font, style, colors, etc.)...
My question: what is the use case for a strictly type-defined string control?
07-09-2024 09:50 AM
@GerdW wrote:Most use cases for text selection (IMHO) are about text formatting (font, style, colors, etc.)...
My question: what is the use case for a strictly type-defined string control?
Most use cases yes, but what if I just want to pre-select some text as part of the user input logic?
The problem is more that the same property "Selection" of class Text serves 2 different purposes:
1. Changing font, color, ... of some part of the text (which is purely cosmetic).
2. Pre-selecting text for user input (which is more about user input logic).
But maybe Paul can give use his specific use case...
Regards,
Raphaël.
07-09-2024 12:45 PM
In my use case, the string is contained in a cluster that is strictly typedef'd.
I want to change the value then specify which parts are Unicode using:
Since I really want that cluster to remain strictly typedef'd, I worked around it by disconnecting typedefs in the build (making debugging more cumbersome).
07-10-2024 08:51 AM
AND,
If you put an XControl in a strictly typedef'd cluster, none of its custom properties that you've created are writeable.
But you can fake it by creating a method that writes to the state of the XControl.