Copying and Pasting code from mycnc website creates compiling errors

Post Reply
drphil
Posts: 81
Joined: Tue May 21, 2019 7:30 pm

Copying and Pasting code from mycnc website creates compiling errors

Post by drphil »

I just discovered that if I copy and paste code available on your website directly into mycnc it also inserts source formatting which you can see in the mycnc window. When I go to compile this code I get errors.

However if I first copy the code into gedit, then into mycnc it compiles correctly as you can see in the screenshots below.
I can't even begin to tell you the amount of hours and days I've wasted trying to figure out what I'm doing wrong, thinking that I just can't figure it out for some reason. When you're dealing with multiple factors, small things like this can be easily overlooked or dismissed as irrelevant.
So, This is also in reply to the multiple times I said that I coped and pasted the code and it didn't work.
Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh :o
image.png
image.png
image.png

drphil
Posts: 81
Joined: Tue May 21, 2019 7:30 pm

Re: Copying and Pasting code from mycnc website creates compiling errors

Post by drphil »

It seems the mycnc application can not accept pasted code from the forum as well as the main site.

ivan
Posts: 320
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Copying and Pasting code from mycnc website creates compiling errors

Post by ivan »

Morning - this is a weird issue that we haven't run into before. I just tested this on my side (Ubuntu Mate 18.04.3, Firefox 70, myCNC 1.88.3601) and could not replicate it, both forum and documentation website had their code compile smoothly. It might have something to do with the Tinkerboard build. I'll run the tests on a different machine and get back to you.

drphil
Posts: 81
Joined: Tue May 21, 2019 7:30 pm

Re: Copying and Pasting code from mycnc website creates compiling errors

Post by drphil »

So it has a lot to do with what operating system you’re on, and how the clipboard and my CNC interprets the pasted contents. Chrome and windows 10, tinker board build.
If you notice the text color and background color are pasted in to the window, that extra information is what’s causing the issue

ivan
Posts: 320
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Copying and Pasting code from mycnc website creates compiling errors

Post by ivan »

We have reproduced the issue, it seems to be affecting Chrome and Chromium-based browsers on Tinkerboard machines - it doesn't appear to be happening with Firefox, or on regular Ubuntu builds with Chromium. We'll be seeing whether it's something we can fix on our end, but it might be something we don't have much control over. In any case, for any users affected, it is recommended to either copy-and-paste the code into your text editor of choice (Pluma, gedit, etc) before inserting it into myCNC, or to type it up by hand.

drphil
Posts: 81
Joined: Tue May 21, 2019 7:30 pm

Re: Copying and Pasting code from mycnc website creates compiling errors

Post by drphil »

This is also a problem on Windows 10 using Chrome
image.png

ivan
Posts: 320
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Copying and Pasting code from mycnc website creates compiling errors

Post by ivan »

We'll continue looking into this - the clipboard issues are reproducible, but it is still unclear what it is about Chrome specifically that's causing them.

Post Reply