Previous Application Programming: Creating IDL Projects Next

Adding, Moving, and Removing Files

After you have created a project, you can easily add, move, and remove application files.

Adding Files

To add files to your project, complete the following steps:

  1. Open your project. Select File Open Project. Select the path and name of your project file.
  2.  

  3. Click Project Add/Remove Files... The Add/Remove Files dialog is displayed.
 

 

Figure 22-6: Add/Remove Files Dialog

Figure 22-6: Add/Remove Files Dialog
  1. Select the path and name of the file you want to add to your project. From the dropdown list, select the group you want to add the file to and click the Add button. You will see the file added to the list of current files in your project.
    • If your application contains an object that is defined in a .pro file, you must add the .pro file to your project list before building your project. If the object has any inherited properties from its superclass, you must also include the .pro file for the superclass if the superclass is a .pro file. Objects using a .pro extension typically exist in the IDL distribution's lib subdirectory and its subdirectories. The IDL Reference Guide identifies object superclasses and gives the location of the object's source code.
    •  

      For example, if you have defined an object in the file myobject__define.pro, and this object uses the methods of IDLgrLegend, you must include both myobject__define.pro and a copy of IDLgrLegend's source code, idlgrlegend__define.pro, in your project list.

       

      If your object files call any other routines defined in .pro files, you must include these .pro files in your project list as well.

       

    • If your application calls any routines via quoted strings, such as in CALL_PROCEDURE, CALL_FUNCTION, CALL_METHOD, EXECUTE, or in keywords that can contain procedure names such as TICKFORMAT or EVENT_PRO, you must include the .pro files for these routines in your project list.
    •  

    • If your application uses IDL variables, such as a custom ASCII template, or if you want to distribute other procedures and functions that are not included in your main .sav file, you will need to create .sav files using the SAVE procedure. You must save variables and procedures in separate .sav files. These .sav files can be restored by using the RESTORE procedure in your main procedure, or can be restored automatically by IDL when resolving a routine with the same name as the .sav file.
    •  


      Tip
      You can also add files to your project by dragging and dropping the files from any file manager. (On some Motif platforms, dragging and dropping is not supported. In this case, use the Add/Remove... dialog.) If the file you want to add to your project is already open in an IDL editor window, right click in the editor window and select Add to Current Project from the shortcut menu.

     

  2. Continue to add the files you want to include in your project. Then click OK.
  3.  

  4. You can expand the listings in the Project window to see the files you have added.
  5.  

  6. Save your project file by selecting File Save Project.

Moving Files

When you add a file to your project, it will be added to the appropriate group (based on the groups' file filters). If you want the file to exist in a different group, you can move it to that group. To move a file, complete the following steps:

  1. Open your project. Select File Open Project. Select the path and name of your project file.
  2.  

  3. Click on the plus sign to expand the listing of the project files until you see the file you want to move.
  4.  

  5. To move the file, select the file and then drag it to a different group or right click over the file you want to move and select Move To... from the shortcut menu and then select the different group.
  6.  


    Note
    On some Motif platforms, dragging and dropping is not supported. In this case, use the Move To... menu item on the shortcut menu.

     

  7. Save your project file by selecting File Save Project.
  8.  


    Note
    When moving a file in your project, it does not change the actual path of the file, it only changes the group in which the file appears within your project.

Removing Files

When you no longer want a file to be in your project, you can remove it. When you remove a file from your project, it does not delete the file on your disk, it only deletes the reference to the file from your project.

To remove files from your project, complete the following steps:

  1. Open your project. Select File Open Project and select the path and name of your project file.
  2.  

  3. Click Project Add/Remove Files... The Add/Remove Files dialog is displayed.
  4.  

  5. Click on the file you want to remove from your project in the current files listing. Click Remove.
  6.  


    Tip
    You can use the shortcut menu to remove a file. Right click over the file and then select Remove. On Windows, you can also use the Delete key to remove files. Select the file by left-clicking over the file and then press the Delete key. On Motif, you can also highlight the file you want to remove, and press Ctrl+A to remove the file.

     

  7. Save your project file by selecting File Save Project.

  IDL Online Help (March 06, 2007)