Page 1 of 1
Clipboard in 6.0 and 6.0.1
Posted: Thu May 02, 2013 11:17 pm
by lohill
Below is a chunk of code I have used in my Portfolio Management program going back as far back as when LiveCode was runRev versions 4.x. It is used after I have copied dividend information from my stock broker's web site. It has worked perfectly until LiveCode 6.0 and now 6.0.1. With these new versions, the appearance of the dialog showing the first line of dividends takes up more than the full width of the screen and if you answer 'OK', the data that gets used is corrupt. On the other hand, if I first paste the material I have copied into Text Edit (Mac with Mountain Lion) and then re-copy it from there for use in my program, the result looks and works just as it always did before.
Any one else experience something similar? I can continue to use 5.5.4 but someone should be aware of this.
Larry
Code: Select all
put the clipboarddata into tData
put the first line of tData into tClipKey
If tClipKey is empty then
answer "The clipboard is empty."
exit PasteDividends
end if
answer information "Does this snipit of data look OK?"& return & tClipKey with "Yes" or "No" titled "Paste Data"
Re: Clipboard in 6.0 and 6.0.1
Posted: Sun May 05, 2013 12:05 pm
by BvG
It probably depends on the data? Do you have the same problem with strings copied from other sources? If not, maybe you can save the clipboard into a file, and attach that to a bug report:
http://quality.runrev.com
Code: Select all
put the clipboarddata into theData
answer file ""
put theData into url ("binfile:" & it)
Re: Clipboard in 6.0 and 6.0.1
Posted: Sun May 05, 2013 11:46 pm
by lohill
I am trying to file a bug report but the login that I consider to be the one for my LiveCode account does not seem to work for filing bug reports.
I wrote this to produce the .bin file but don't know how to get it to you.
Code: Select all
on mouseUp
put the clipboardData into tClip
put line 1 of tClip into tClipKey
If tClipKey is empty then
answer "The clipboard is empty."
exit mouseUP
end if
answer question "Does this snipit of data look OK?"& return & tClipKey with "Yes" or "No"
If it is "Yes" then exit mouseup
put the clipboarddata into theData
ask file ""
put theData into urlĀ ("binfile:" & it)
end mouseUp
Regards,
Larry
Re: Clipboard in 6.0 and 6.0.1
Posted: Mon May 06, 2013 12:33 am
by sturgis
I didn't think you could hit clipboarddata directly. Thought it was in array format.
If you "put the keys of the clipboarddata" it should return a list of keys defining the type of data in the array. When you do the copy and it is NOT working (skipping textedit) what are the keys of the array?
if you "put the clipboardData["text"] into tClip does it work?
Re: Clipboard in 6.0 and 6.0.1
Posted: Mon May 06, 2013 2:12 am
by lohill
I have been 'hitting clipboard directly' since version 4 of LiveCode and the problem only showed up in Version 6.
Putting clipboardData["text"] dis not appear to make any difference.
Larry
Re: Clipboard in 6.0 and 6.0.1
Posted: Mon May 06, 2013 2:43 am
by sturgis
Hmm. When you do check the keys on the data that doesn't work, is there more than one key listed? What keys are there? I don't think I understand everything I know about the clipboard!
Re: Clipboard in 6.0 and 6.0.1
Posted: Mon May 06, 2013 7:30 am
by jacque
If no key is specified you get text by default.
My guess is that the format of the data has changed. Do what Sturgis suggested and get the value of each key. If one of them contains data, you can see what format is being sent back. If it's HTML then all you probably need to do is add a tag or two to force the dialog to display correctly.
If the same data looks okay in 5.5.4 then it's worth a report. The QCC doesn't use the same login as your store account, you'll need to create a new account for bug reports.
Re: Clipboard in 6.0 and 6.0.1
Posted: Mon May 06, 2013 4:02 pm
by lohill
Thanks for the responses. I have filed a bug report #10893.
My initial description of corrupt data was a bit harsh. Actually the data looks good except where I would expect something like a tab between columns of data there are now a very large number of spaces.
Larry
Re: Clipboard in 6.0 and 6.0.1
Posted: Tue May 07, 2013 8:59 am
by Mark
Hi Larry,
How did you check the number of spaces? Perhaps it is just a problem with the formatting of your field? E.g. tabstops or one of the new properties.
Best,
Mark