X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



15646 Rate this article:
4.5

How do I copy and paste text from a native Mac OS X application to an X11-based IDL widget program?

Question:

How do I copy and paste text from a native Mac OS X application to an X11-based IDL widget program?

Discussion:

IDL widget programs running on Mac OS X use X11-based GUI components. The XQuartz/X11 system maintains its own pasteboard, separate from the Mac OS X pasteboard. As a result, it can sometimes be a challenge to copy and paste text between the two pasteboard systems.

Solution:

To enable the copying and pasting of text from a native Mac program to an IDL widget program do the following.

  1. Quit out of IDL if it is currently running
  2. Start XQuartz/X11 if it is not already running (from the Finder, launch XQuartz.app, located under the /Applications/Utilities folder
  3. In XQuartz, select XQuartz->Preferences
  4. In the XQuartz Preferences dialog, select Input and then check "Emulate three-button mouse".
  5. Under the Pasteboard view, check "Enable syncing" and then check all sub-items.
  6. Close the XQuartz Preferences dialog and then quit XQuartz.

 


 
After making the above changes to your XQuartz preferences, here are instructions to copy and paste text between a native Mac application and an IDL text widget:

Native Mac Application to IDL Widget

After you have configured the XQuartz preference as above, you'll be able to copy and paste text from a native Mac application to an IDL widget program, as follows:

  1. Open your native Mac application.
  2. Select and copy the target text from the application, using the keyboard combination, Command-C (not Control-C).
  3. Launch your IDL widget program.
  4. Hold down the Option key and click your "left" mouse button in the text input field of your IDL widget program. Your text should then appear in the text field.


IDL Widget to Native Mac Application

To copy/paste text from an IDL widget program to a native Mac application, do the following:

  1. Select the target text in your IDL widget program
  2. Just press Command-C to copy the text.
  3. Finally, press Command-V to paste the text into your native Mac application. 

 

Example IDL Code:

Here are some IDL commands you can enter at your IDL> command prompt to create a quick text widget for testing the above:

wb = widget_base(/column)
wt = widget_text(wb, xsize=80, ysize=20, /editable)
widget_control, wb, /realize

(Tested on Mac OS X 10.11.6 with XQuartz 2.7.9.)

 

 

Reviewed by JU (10.14.2016), JB (10/14/2016)

 

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »