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

You need some new stunning features ? Tell us here.
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

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

Post 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
SniffTheGlove
Enthusiast
Enthusiast
Posts: 122
Joined: Sat Nov 19, 2011 6:51 pm

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

Post 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
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

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

Post 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
User avatar
HwyStar
Enthusiast
Enthusiast
Posts: 101
Joined: Mon Apr 05, 2010 7:13 pm
Location: Reno, Nevada

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

Post 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.
User avatar
newtheogott
Enthusiast
Enthusiast
Posts: 120
Joined: Sat Apr 26, 2003 2:52 pm
Location: Germany, Karlsruhe
Contact:

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

Post 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.
--Theo Gottwald
-----------------------------------------
http://www.it-berater.org * http://www.fa2.de * http://www.smart-package.com
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

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

Post 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.
Post Reply