Rebol Talk Forum  |  Getting Started  |  Ask the Guru! (Moderator: Carl)  |  Topic: Can not COPY text from AREA space
Pages: [1] Print
Author Topic: Can not COPY text from AREA space  (Read 457 times)
Reboludo
Newbie
*
Offline Offline

Posts: 12


View Profile
Can not COPY text from AREA space
« on: July 09, 2008, 01:44:44 AM »

Dear friends,

I am finding out the following issues with COPY/PASTE in a simple but useful application for text-data entry:

1. I can cut/copy text via mouse from other text applications into the REBOL application's AREA only by CTRL-V, not by right-click and select-paste.


2. I CAN NOT copy/cut text from the REBOL application's AREA neither by mouse-button, nor by CTRL-C of the selected text. I can highlight the text with the mouse,. in the AREA, and when I CTRL-C the text un-highlights (as if the text went to the clipboard), but NO, it does not. Right-click on the highlighted text at the AREA does nothing.

I am running Ubuntu. Here's a simple code that uses an AREA for text-entry, where these issues of cut/paste can be easily tested, for whoever would like to help me clear me on this.

Code:
MyView: layout [
  MyArea: area
  button "Quit" [quit]
]
focus MyArea
view MyView

CTRL-t 'cuts' text out of the area, as if it went to the clip-board, but it's not at the clipboard.

Thank you for any help/suggestions on this!
Logged
notchent
Newbie
*
Offline Offline

Posts: 40


View Profile WWW
Re: Can not COPY text from AREA space
« Reply #1 on: July 09, 2008, 02:12:05 AM »

I don't use Ubuntu, but one possible quick workaround may be to try RebGUI for your UI Smiley
Logged

DideC
Newbie
*
Offline Offline

Posts: 32


View Profile
Re: Can not COPY text from AREA space
« Reply #2 on: July 09, 2008, 04:00:00 AM »

CTRL-C may copy the text to the clipboard. It's the only way in Rebol app because right menu does not exists.
It's because rebol handle all the UI stuff. For other Linux apps, it's use usually the Window Manager that handle the UI and so, it looks "standard" in it's functionality.

Looking in the Mailing-list, it seems to not be new. Look at the last post in this thread : http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlRWHC

But I can't help you to solve it, sorry.
Logged
Gabriele
Full Member
***
Offline Offline

Posts: 182


View Profile WWW
Re: Can not COPY text from AREA space
« Reply #3 on: July 09, 2008, 05:38:04 AM »

CTRL-C does work, but not in a way that most Linux applications like. After doing a CTRL-C in the area, try clicking with the middle mouse button in the (non-REBOL) field you want to paste the text too - that should work (it does here, Kubuntu 8.04). The reason for this is that Linux has two clipboards, the X Window Server one and another one handled by Gnome or KDE (or actually, Qt or GTK, AFAIK). REBOL only supports the first.
Logged
Reboludo
Newbie
*
Offline Offline

Posts: 12


View Profile
Re: Can not COPY text from AREA space
« Reply #4 on: July 09, 2008, 11:10:29 AM »

Notche, thanks for your suggestion.
I have investigated it a little but for now I'd want to stay as simple as possible.
Later, when I am over the basics, I'll certainly explore that.
.......

DideC, thanks for clearing the cut/paste interface.
Will search the thread you provided. It will be useful.
I'm glad it's not a new issue. I am new in REBOL, though. Sad

.......

Gabriel, thanks for your pointers.
What you say checks with my stumblings on this. I started on REBOL a week or so ago and have not stopped. Only thing is just yesterday I moved from Hardy version to the latest Ubuntu Gutsy, and it does take time to come back to stable. I do recall that the mouse buttons were not functional but was happy enough that CTRL-C and CTRL-V worked, but do recall sometimes I'd get the wrong text in or out (don't quite recall).

However, it's very good you explain about the TWO clipboards in Linux which I will definitely investigate. If it's a matter of a 'middle button', or how to access a particular clipboard, I feel that can be resolved somewhow.

It seems to me that in the previous Ubuntu (Feisty) CTRL-C worked, perhaps with some issue.

But in Hardy (current version) CTRL-C does not allow me to access the text yet. That's why I now noticed it.

It's also because in this little application, which I am already using, its main job is to paste text into it, which still works OK, but only with CTRL-V, and I did not mind much if the mouse buttons didn't work to copy/paste in REBOL.



Logged
Reboludo
Newbie
*
Offline Offline

Posts: 12


View Profile
Re: Can not COPY text from AREA space
« Reply #5 on: July 09, 2008, 11:36:04 AM »

PROBLEM SOLVED!
----------------------------

Am happy to report that in REBOL Ubuntu Hardy, text highlighted in an AREA indeed IS copied to one of the two clipboards in Ubuntu.

Now, to PASTE that text into another text application, I CLICK both the LEFT and RIGHT mouse buttons simultaneously.

(Using CTRL-V pastes text but from one of the two clipboards, as explained above by Gabriel).

Thanks all who helped! Cheesy
Logged
Reboludo
Newbie
*
Offline Offline

Posts: 12


View Profile
Re: Can not COPY text from AREA space
« Reply #6 on: July 16, 2008, 12:45:08 PM »

Would like to add having verified (subject to further corrections or clarifications), the following;

1. There are not quite TWO System-clipboards in Ubuntu, or at least depending on the names given to them.

2. There is one TEXT-only  System-buffer which stores the text highlighted (applies to most applications, not in REBOL, though) immediately as it is highlighted, with no further action required. Aside and beyond, is the actual Clipboard, which  is much more complex in capability, since it can store (or point-to) various  types of objects, beyond TEXT). Highlighting (selecting) another TEXT immediately replaces the TEXT-Buffer's contents. Some applications may have chosen to use the Buffer differently.

3. In the Ubuntu Hardy-Heron, which uses the X11 screen manager, and works as above, REBOL uses only the TEXT buffer. This means that as soon as one highlights text in a non-REBOL applicaton, one can CTRL-V that highlighted  text into a REBOL text-entry Area. If one highlights TEXT as such, the text goes into that buffer, and stays there even when one un-highlights it. Sending that TEXT to the System-Clipboard, has nothing  to do with REBOL.

4. To use TEXT -FROM- a REBOL-Area, in Ubuntu, highlighting text is not enough, one has also to CTRL-C, which puts  the TEXT in the TEXT buffer, and NOT in the System-Clipboard.  This means that one CAN NOT put TEXT from REBOL into the System-Clipboard, but only into the said TEXT-BUFFER. Hence, in order to paste that TEXT into a non-REBOL application,  one can do so by clicking mouse-button-3 (or both Left and Right mouse buttons simultaneously).

5. TEXT can be copied within REBOL-Area itself by CTRL-C (copy-text) followed by CTRL-V (insert text).

6. How Applications use the system TEXT-Buffer and the System-Clipboard, is up to the Application developers,  or the facilities with which they are developed. REBOL Is found to do as said.

Just posting this in case it might be of use to someone. Other Linux systems that use X11 screen systems probably work the same.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Ask the Guru! (Moderator: Carl)  |  Topic: Can not COPY text from AREA space
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 09:21:54 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2287 Posts in 593 Topics by 3725 Members
Latest Member: Heigueundulge

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc