Page 1 of 1

[Done] - Caption and "Caption is a variable ?" feature

Posted: Sun Apr 14, 2013 8:36 am
by Maitre_Kanter
Hello,

I noticed a wrong behavior with Form Designer 5.11.

Follow these steps :
Step 1 - write a caption String "This is my Caption" when "Caption is a variable ?" option is unchecked
Step 2 - check it, an error occur : "Invalid character in variable name" --> It's the correct behavior.
Step 3 - the option is now always checked and it's very hard to unchecked (press mouse button, move cursor outside canvas and release button)

Is it possible to uncheck it automatically after the error detection ?

Arnaud

Re: [PB5.11] - Caption and "Caption is a variable ?" feature

Posted: Sun Apr 14, 2013 12:19 pm
by SniffTheGlove
The reason for the error is that the caption you are using has at least a 1 space in it, therefore under general programming rules variables do not contain spaces.

If you click back into the string after ok'ing then the check is unchecked

Re: [PB5.11] - Caption and "Caption is a variable ?" feature

Posted: Tue Apr 23, 2013 12:01 pm
by Maitre_Kanter
SniffTheGlove wrote:The reason for the error is that the caption you are using has at least a 1 space in it, therefore under general programming rules variables do not contain spaces.

If you click back into the string after ok'ing then the check is unchecked
Thank you, but click back to string after the error is not intuitive.

May be uncheck the tickbox automatically is the solution ?

What do you think about it ?

Arnaud

Re: [PB5.11] - Caption and "Caption is a variable ?" feature

Posted: Tue Jan 19, 2016 5:12 am
by HwyStar
I agree with Maitre about this bug.

The Form Designer should not mess with the value that is passed into it. If it is a variable then read the variable name into the Caption field. If it is a sting, surrounded by quotes then read the entire text into the field "with quotes".

Is the Variable click box really needed? Does the Event Loop or Event Procedure use this field anyway?

I cannot get the mouse clicking in the caption field to do anything other than split my text ("Inventory Items") into two variable names.

Re: [PB5.11] - Caption and "Caption is a variable ?" feature

Posted: Sun Feb 14, 2016 10:19 pm
by newtheogott
Additionally, the Form Designer could itseld remove unused Spaces.
For this there is a TRIM Command available in any language.
Furthermore it should also trim out all characters that are not allowed thus avoiding any error-message.
Alternatively, it can generate variables "A0001"-"A9999" himself and use these variables.
If somebody wants other variable-names he can later adjust these.
The impoprtant point is, to avoid possible sources of buggy code that does not compile.
And this is possible.

Re: [PB5.11] - Caption and "Caption is a variable ?" feature

Posted: Fri Mar 25, 2016 1:46 pm
by Polo
Maitre_Kanter wrote:Hello,

I noticed a wrong behavior with Form Designer 5.11.

Follow these steps :
Step 1 - write a caption String "This is my Caption" when "Caption is a variable ?" option is unchecked
Step 2 - check it, an error occur : "Invalid character in variable name" --> It's the correct behavior.
Step 3 - the option is now always checked and it's very hard to unchecked (press mouse button, move cursor outside canvas and release button)

Is it possible to uncheck it automatically after the error detection ?

Arnaud
Fixed.