ks@tut.fi (Syst{ Kari) (09/27/90)
If problems in using copy/paste between different applications in OW 2.0. Now I'm requesting help or pointers to help. After doing some experiments I have found out the following: There seems to be three families of applications in my OW 2.0 environment: xview-applications (mailtool, shelltool etc.) X-applications (xterm, xemacs etc.) NeWS-application (psterm, nemacs etc.) I'm can copy/paste information from application to another inside such family, but I have difficulties in copying the information to/form application of a different family. In NeWS the selection-dict (got by operator 'getselection') may contain a key XSelection? (=true), but I don't know how to get the contents of such selection. In the other direction I can set a PrimarySelection in a NeWS-application, and my xterm is able to use that selection. The xview-applications seem to have they very own selection-buffers and a special (undocumented?) program 'xv_get_sel' can get the contents of a the selected text from a xview-application. Unfortunately if no text is selected, I get a error message X Error: BadWindow Request Major code 2 () Request Minor code 1 ResourceID 0xb00004 Error Serial #148 Current Serial #148 and if my console happens to be xterm, it dies ! -- This article represents my personal views. Quote of the year: "X is the Fortran of windowing systems." Kari Systa, Tampere Univ. Technology, Box 527, 33101 Tampere, Finland work: +358 31 162585 fax: +358 31 162913 home: +358 31 177412
tomj@snowking.Eng.Sun.COM (Tom Jacobs) (09/28/90)
In article <KS.90Sep27181300@karikukko.tut.fi>, ks@tut.fi (Syst{ Kari) writes: ... ... |> The xview-applications seem to have they very own selection-buffers and |> a special (undocumented?) program 'xv_get_sel' can get the contents of a |> the selected text from a xview-application. Unfortunately if no text |> is selected, I get a error message |> X Error: BadWindow |> Request Major code 2 () |> Request Minor code 1 |> ResourceID 0xb00004 |> Error Serial #148 |> Current Serial #148 |> and if my console happens to be xterm, it dies ! The xv_get_sel command is exactly equivalent to the SunView get_selection command. You've discovered a bug :-) that we'll take a look at. BTW, the man page for xv_get_sel accidently got left out of OWV2, so here it is... --Tom ======================================================================== =========== XV_GET_SEL(1) USER COMMANDS XV_GET_SEL(1) NAME xv_get_sel - copy the contents of a X selection rank to the standard output SYNOPSIS xv_get_sel [ rank ] [ t seconds ] [ D ] AVAILABILITY This command is available with the OpenWindow's software installation. DESCRIPTION xv_get_sel prints the contents of the indicated selection on standard out. A selection is a collection of objects (for instance, characters) picked with the mouse in the OpenWindows X11/NeWS window system. OPTIONS rank Indicate which selection is to be printed: 1: primary; 2: secondary; 3: clipboard. The default is primary. t seconds Indicate how many seconds to wait for the holder of a selection to respond to a request before giving up. The default is 6 seconds. D Debugging. Inquire through a special debug- ging service for the selection, rather than accessing the standard service. Useful only for debugging window applications which are clients of the selection library. EXAMPLE The following line in a OpenWindows Desktop menu file provides a menu command to print the primary selection on the user's default printer: ``Print It'' csh -c xv_get_sel | lpr ===========================================================