LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
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.
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"
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
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.
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
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?
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!
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
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.
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode