• Welcome to PlanetSquires Forums.
 

Textbox controls don't persist data in design mode correctly

Started by Michael Stefanik, August 10, 2023, 09:44:44 PM

Previous topic - Next topic

Michael Stefanik

If you add a textbox control to a form and set the Text property in the designer to something that includes a colon, when the project is saved, everything past the colon is truncated.

For example, add a textbox (Text1) and set the Text property to "Text1: This is some text". Compile and run, all is fine. Close the project and reopen it, and all it shows is "Text1" and although the auto-generated WINFBExxxx.bas file contains:

pForm->Text1.Text = "Text1: This is some text"
The JSON in the .design file has this:

        {
          "name": "Text",
          "value": "Text1"
        },

It looks like whenever the JSON design file is created/updated, anything after a colon is being truncated and this is taking precedence over what's actually set in the generated code. I noticed this issue because some test programs that I created which used URLs were broken after saving the project.
Mike Stefanik
sockettools.com

Paul Squires

Thanks Mike - interesting one. I assume that I will have to escape the color character so that the json interpreter deals with it correctly. I will investigate.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer