Page 1 of 1

Bug with quotes in captions

Posted: Sun Jun 02, 2013 6:26 am
by MachineCode
I put the following name for a window caption with the form designer:

Code: Select all

Properties for "<name>"
And the designer made the source code like this:

Code: Select all

Window_0 = OpenWindow(#PB_Any, 0, 0, 920, 530, "Properties for "<name>"", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
And when trying to run it, you get this error:

Code: Select all

Line 7: Boolean comparisons can only be used with test operators like If, While, Repeat. Use Bool() instead.
So, the solution would be for the designer to replace any quotes in captions with Chr(34) in the code only, like so:

Code: Select all

Window_0 = OpenWindow(#PB_Any, 0, 0, 920, 530, "Properties for "+Chr(34)+"<name>"+Chr(34), #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
But the designer still must show only "name" on the window title in the design view, as well as in the caption field, and not show "Chr(34)".

Good luck. :)

Re: Bug with quotes in captions

Posted: Sun Jun 02, 2013 11:14 am
by Polo
Thanks for the report, for now it doesn't replace anything but that would be a nice addition!