|
Post by metro on Apr 14, 2019 23:37:25 GMT -5
If I copy code from this forum using the "Copy Code" link at the top of any displayed code I can paste it into the Libertybasic(5) editor Windows version without issue, this is the Windows version running in Wine.
However the same cannot be done on my Mint Linux(64) System (using the lb5(linux) verson)
I need to paste it to a Linux editor then copy it again from that editor and it will paste into the Lb5(Linux) editor
Clear as mud yeah
|
|
|
Post by metro on Apr 15, 2019 17:59:36 GMT -5
Must be just my system then!
|
|
|
Post by Chris Iverson on Apr 15, 2019 18:04:47 GMT -5
No, I see it too, but inconsistently. For a while, I had it working with the "Copy Code" link, but I'm not sure how it was, and it stopped working after a few tests.
I suspect there's some kind of difference in how Firefox and something like gedit advertise and manipulate clipboard contents, that the VisualWorks Smalltalk engine is interpreting differently. I don't know enough about how X applications work to be sure, though.
|
|
|
Post by metro on Apr 15, 2019 18:38:26 GMT -5
No, I see it too, but inconsistently. For a while, I had it working with the "Copy Code" link, but I'm not sure how it was, and it stopped working after a few tests. I suspect there's some kind of difference in how Firefox and something like gedit advertise and manipulate clipboard contents, that the VisualWorks Smalltalk engine is interpreting differently. I don't know enough about how X applications work to be sure, though. Thanks Chris, since my last post I have typed code into lb5-349 (Windows via Wine) then Edit Copy All paste that code into the lb5-349(Linux) editor and what is posted is the contents of the previous Copy to clipboard that begs the question does the VM for VisualWorks Smalltalk (Linux) and (windows) look in a different place for clipboard contents ******pause .... a slight digression before completing the post *************** I thought I would google it
EDIT: I guess we are now aware that is happening , I now agree with you Chris that it is intermittent
BUT the source of the problem is the "Copy Code" link
I've just re-tested what I did earlier and Copy-Paste works as it should between the two versions of lb5 BUT then after using the "Copy Code" link on this forum I'm back to having the problem.
If I highlight code from the forum using the mouse then Ctrl C I do not have the problem.
I will now avoid the"Copy Code" link
|
|
|
Post by Carl Gundel on Apr 19, 2019 9:54:01 GMT -5
Without claiming to be an expert in Linux clipboard but my understanding is that not all versions of Linux treat the clipboard the same way, and so writing software that treats the clipboard consistently between distros can be tricky.
If on the other hand you are seeing different behavior between LB5 builds on the same version of Linux, some way to demonstrate this would be great.
|
|
|
Post by metro on Apr 19, 2019 19:01:54 GMT -5
Without claiming to be an expert in Linux clipboard but my understanding is that not all versions of Linux treat the clipboard the same way, and so writing software that treats the clipboard consistently between distros can be tricky. If on the other hand you are seeing different behavior between LB5 builds on the same version of Linux, some way to demonstrate this would be great. Certainly no expert this end (can't even master the Queens english)
My take would be there are many clipboard "managers" but the methodology would be unix (linux) specific ie handled the same way.(mind you been wrong many times in the past.)
So this is what is happening for me with Mint Linux v19 Tara (64) latest Firefox
Copy some random text from the internet, iused bunnings pine , highlight and copy paste it into any build of lb5(Linux)
Then goto a post on this forum say....http://libertybasiccom.proboards.com/thread/592/qr-code and copy Johns code using the"copy code" link
Paste that into all linux builds of lb5(Linux) and you will get "bunnings pine" BUT past into lb5(Windows_in_Wine) and or a text editor on your system and you will get Johns code
I then installed xclip
ran this
xclip -selection clipboard blank
From then on lb5(Windos_Wine) and my linux editor would paste nothing (blank)
BUT lb5(Linux) all builds paste "bunnings pine"
I will spend some time trying to find out why
EDIT: close down Firefox, re-start then copy johns code it will paste into lb5(linux) all builds correctly I don't understand enough to know if Firefox is to blame.
EDIT search for Firefox won't copy paste, seems it could be the issue strange though if I avoid the copy paste link and only highlight / copy it works fine
|
|
|
Post by metro on Apr 19, 2019 19:29:48 GMT -5
Just a followup I copied Johns code again then ran xclip -o -t TARGETS results below The second run of the above script was after I copied the contents from lb5(linux) build 348 which was "bunnings pine"
EDIT : Sorry to have wasted everyone's time with this I now believe it is a Firefox issue I installed Chromium and could not duplicate the problem.
|
|
|
Post by metro on Apr 22, 2019 2:15:17 GMT -5
At the risk of confirming I'm a complete moron It would appear this issue is not resolved (for me) as no one else seems to be having issues it could just be my system. or ... I'm the only one currently using copy and paste between LB versions When using LB4.5 The code below generates variables for the contents of textboxes (when Create Button is pressed) then I Copy to Clipboard. If I paste this into lb5(Windows Wine) I get the correct result If I paste into lb5(Linux) I get what ever I have previously Copied. (as explained in my previous posts) I have even closed lb5-349 and re-started only to find that the copy before last is still the one pasted into the lb5-349 IDE editor
'global linedat$'
[setup.main.Window]
'-----Begin code for #main
nomainwin WindowWidth = 550 WindowHeight = 410 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
'-----Begin GUI objects code
TexteditorColor$ = "white" texteditor #main.te2, 75, 132, 375, 110 texteditor #main.te1, 80, 10, 375, 110 button #main.button1," Create ",[button1Click], UL, 25, 55, 50, 25 button #main.button2,"Copy 2 Clipboard",[button2Click], UL, 140, 262, 114, 25 menu #main, "Edit" ' <-- Texteditor menu. '-----End menu code
open "untitled" for window as #main print #main, "font ms_sans_serif 10" print #main, "trapclose [quit.main]"
[main.inputLoop] 'wait here for input event #main.te1,"!cls" ; #main.te1,"textbox #dpndt.tbFirstName, 450, 50, 100, 20" #main.te1,"textbox #dpndt.tbSecondName, 450, 75, 180, 20" #main.te1,"textbox #dpndt.tbSurnameName, 450, 100, 180, 20"
wait
[button1Click] 'Perform action for the button named 'button3' #main.te1 , "!lines n" ;
for n=1 to n #main.te1, "!line "; n ;" linedat$" if linedat$ <> "" then call CreateFields$ linedat$ end if next n wait
[button2Click] 'Perform action for the button named 'button4' #main.te2, "!selectall" #main.te2,"!copy" wait
[quit.main] 'End the program close #main end
sub CreateFields$ linedat$ hndlename$=upto$(linedat$,",") hndlname$= AFTER$(hndlename$ ,"textbox") 'hndl$=upto$(fldname$,".") fldname$=after$(hndlname$,".") final$=hndlname$+", "+chr$(34)+"!contents? "+fldname$+"$"+chr$(34) #main.te2, final$ end sub
|
|