Text assignment to String in IDE corrupts project

I’m using Xojo 2017 r3 on an iMac with 10.13.3. I was debugging a copy of one my Xojo applications when I met a problem with the IDE. Here is a simple project which, for me, exhibits the problem.

Create a new project and in Window1 put a OK button and a TextAreaz. Make the Action code in OK this:

Dim zStr As String
zStr = “x^0 = 1”+EndOfLine+”x^1 = x”+ EndOfLine+”x^2 = x^2”+ EndOfLine+”x^3 = x + 1”+ EndOfLine+”x^4 = x^2 + x”+ EndOfLine+”x^5 = x^2 + x + 1”+ EndOfLine+”x^6 = x^2 + 1”+ EndOfLine
TextAreaz.Text = zStr

Click the Run icon. You should see the error:

This item does not exist
zStr = “x^0 = 1”+EndOfLine+”x^1 = x”+EndOfLine+ etc.
(with “x^0 highlighted)

If instead one uses
zStr = “x^0 = 1”+EndOfLine
things work as they should.

I have opened and closed the project a number of times to try various checks and wrote the above. To do one last check I opened the project again using:

zStr = “x + 1”

but now, when run, it gives the error:

This item does not exist
zStr = “x + 1”
(with “x highlighted)

stringBug is now a corrupted project.

Can anyone reproduce this?


It seems the issue is your curly quotes. You may have smart quotes on. When I take your example line and replace the curly quotes with the basic " it works just fine.


That solved the problem. I didn’t even know I was using smart quotes, and they never gave a problem before. Thanks very much.


That might actually be worthy of a bug report in feedback. If Xojo cannot handle curly quotes, then it should at least automatically replace them with straight ones.