Copy and paste in the IDE

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
MaxV
Posts: 1341
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Copy and paste in the IDE

Post by MaxV » Thu Aug 24, 2017 5:30 pm

Hi,
copy and paste in the IDE is a mess from 8.x to now. The IDE continue to crash or copy invisible chars.
The problem is that the paste commad doesn't paste the pure text, but always the Styled/html creating a disaster. Sometime you can't even copy code from a button to another!
Why should I want to copy "styled" text when I wrote code?
Why should I want to copy "styled" text when I type in the code editor?
Why should I want to copy "styled" text when I type in the property inspector?
Why should I want to copy "styled" text when I type in the message box?

Why this bug is still around?
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1540
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Copy and paste in the IDE

Post by [-hh] » Thu Aug 24, 2017 9:30 pm

This is certainly not a bug. "Invisible" chars are not part of a "style", rather originating from typing and/or from defunct hardware (keyboard).

Also, starting from LC 8 you have the fullClipboardData and the rawClipboardData available. You could simply use the plain text from there, at least for creating a "recipe" for a report.
shiftLock happens

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5385
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Copy and paste in the IDE

Post by FourthWorld » Thu Aug 24, 2017 9:37 pm

Have you reported this to the bug DB?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

MaxV
Posts: 1341
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Copy and paste in the IDE

Post by MaxV » Fri Aug 25, 2017 10:52 am

Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5385
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Copy and paste in the IDE

Post by FourthWorld » Fri Aug 25, 2017 3:40 pm

Thanks. Those appear to be separate issues. All but the last one, which is still seeking a recipe, are in progress. The second one has a pull request, suggesting it's been done.

Given that those are already in progress in the bug DB, that would seem an ideal place to continue triage/resolution efforts


What would you like the other users in this forum to help with?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

MaxV
Posts: 1341
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Copy and paste in the IDE

Post by MaxV » Mon Aug 28, 2017 9:48 am

FourthWorld wrote: What would you like the other users in this forum to help with?
Can you find in the script editor stack what happen with CTRL+V?
Can you set to paste just the pure ASCII text?
The problem is that it pastes text color, font, styles, tags, whatever and so it create a mess.
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5385
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Copy and paste in the IDE

Post by FourthWorld » Mon Aug 28, 2017 5:27 pm

That does not appear to be among the bug reports you listed above.

What is the number of this bug report on pasting plain-text only?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

sphere
Posts: 469
Joined: Sat Sep 27, 2014 10:32 am
Location: the Netherlands

Re: Copy and paste in the IDE

Post by sphere » Wed Oct 11, 2017 8:32 pm

HI,
i'm experiencing the same in LC8.1.6 (and seen before in older versions).
But not in LC8.1.7rc3 here i can use CTRL-C and CTRL-V

Does it really mean it solved as mentioned in bugreport (the highest nr in the message above) ?
It mentiones LC8.2.0dp2

then i quit using LC8.1.6

thanks!
Global Market Share WorldWide Android 84.82%
Global Market Share WorldWide iOs 12%

Just a wild guess that we need more support and features for Android than iOs...

Klaus
Posts: 9581
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Copy and paste in the IDE

Post by Klaus » Wed Oct 11, 2017 9:37 pm

Maybe I am missing something, but since a long time we have a shortcut (and menuitem in Menu "Edit", of course) for -> Paste Unformatted!

bogs
Posts: 603
Joined: Sat Feb 25, 2017 10:45 pm

Re: Copy and paste in the IDE

Post by bogs » Thu Oct 12, 2017 2:38 pm

A lot of text editors (well, on linux, I don't know elsewhere), also have that option Klaus, but I suspect from his wording that Max is looking for it to copy unformatted using ctrl + c, and paste unformatted when using ctrl + v (command-c and command-v on mac) within the script editor.
MaxV wrote:
Thu Aug 24, 2017 5:30 pm
copy and paste in the IDE is a mess from 8.x to now. The IDE continue to crash or copy invisible chars.
The problem is that the paste commad doesn't paste the pure text, but always the Styled/html creating a disaster. Sometime you can't even copy code from a button to another!
I actually think his argument is cogent, the raw copy/paste should be raw, styling should only be added after the fact, using the tab key or automatically after being applied to the object, without having to go to an additional menu -> click step.

After all, he is working in the tool that created the script to begin with, it should understand how to paste it simply. Just my .02
ImageImage

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 944
Joined: Thu Apr 11, 2013 11:27 am

Re: Copy and paste in the IDE

Post by LCMark » Thu Oct 12, 2017 6:43 pm

This really needs a bug report with a recipe and appropriate platform information so we can look into it explaining precisely what the issue is, because the initial post isn't clear at all.

The Script Editor uses styled text for colorization - I'd assert that it is useful that it copies this to the clipboard because you then get a replication of how the code looks when you paste it elsewhere. If you are pasting into a plain-text editor, then the styles get stripped.

The message box now colorizes, so is the same case as above.

Indeed in both the above cases, those components *should* be reprocessing any pasted text to reapply syntax highlighting and colorisation (or remove it if those are disabled), so whatever format the text on the clipboard is in should be irrelevant. (Indeed, I don't seem to be able to reproduce the problem on Mac, even with formatting/colorization turned off...)

In regards to the Property Inspector, then where are you pasting styled text into? There might be some friction there - as, since the PI is written in LiveCode, it uses LiveCode fields which are styled-text capable. There are probably cases where fields in the PI should reprocess the text to strip styles - is that the crux of the matter here?

In regards to general LiveCode fields (e.g. in User Apps), then as Klaus points out, there is a Paste Unformatted option for use in the IDE (which is standard in Apps which have by-default styled fields). That being said, there is certainly a useful engine enhancement here - being able to set a property on a LiveCode field to say "don't use styling" - that would mean you wouldn't have to code such a process yourself in your own apps.

sphere
Posts: 469
Joined: Sat Sep 27, 2014 10:32 am
Location: the Netherlands

Re: Copy and paste in the IDE

Post by sphere » Thu Oct 12, 2017 7:50 pm

Ok maybe i'm missing the point here.
But what i experience is :
copy a piece of script in the script editor using ctrl-c
paste it somewhere else in the script editor using ctrl-v
using lc8.1.6 in windows 7 Pro (and i'm sure i had it a longer time ago, but then i believe it was solved deleting the c:\users\me\appdata\romaing\runrev\preferences\livecode7.rev)
Did this now again but it did not help.

Using the same stack in lc8.1.7rc3 copy/paste using ctrl-c and ctrl-v is working ok
Global Market Share WorldWide Android 84.82%
Global Market Share WorldWide iOs 12%

Just a wild guess that we need more support and features for Android than iOs...

Post Reply

Return to “Bug Triage”