comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Project newbie asks...well what about ENVI projects?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Project newbie asks...well what about ENVI projects? [message #61643 is a reply to message #61632] Fri, 25 July 2008 07:50 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeff N. writes:

> Now, however, i find myself writing a bunch of code that i want to
> distribute to several people, and the idea of setting up a project
> immediately starts to seem attractive. Here's the thing though....the
> code i'm writing is for ENVI. Basically i've got a bunch of .pro
> files that adds a new menu item to ENVI's main menu and then handles
> all the commands on that new menu item. So I think the relevant
> difference here between what i want to do and a normal (?) IDL project
> is that I don't want all of my .pro files to end up compiled into one
> big save file that you launch with a single command. I want to have
> one save file created for each .pro file. Is that possible? Is it
> possible to have the directory that the compiled code ends up in be
> different than the directory where the .pro files are (but maintain
> the directory structure)?
>
> I also have a resources folder that contains text files, images,
> spectral libraries, etc.....stuff that isn't code but still needs to
> end up in the "output" directory where all the compiled code ends up.
>
> In the alternative, should i be thinking about how i could write my
> own "build" program, that searches for .pro files, calls SAVE for
> them, etc. and then handles the resource directory?
>
> Any suggestions would be great.

This was a topic of conversation at yesterday's Extending
ENVI seminar. No one appears to be sure about the right
way to do this. One of the most sensible suggestions I
heard was to add your ENVI save-add folder to your
Workspace as a project, but to make sure it is NOT
on your IDL path.

This way, you can see the contents, drag your completed
save and pro files into it, etc., but not have to deal
with it otherwise.

I think you are going to have to hand-save the sav files
you want to add to ENVI. I would just do this in the normal
way in whatever project folder you are using at the moment,
then drag these files over to the save-add folder.

Note that there is a new way to create the ENVI buttons
now to make your added programs accessible to ENVI. You
no longer have to modify the ENVI menu text file.

Your user function has to have two modules in it: the
normal event handler module that gets called when the
action button is selected, and a procedure defined with
the same name as the event hander with a "_define_buttons"
attached to it:

PRO MyFunction_Define_Buttons, buttonInfo
.............
END

PRO MyFunction, event
........................
END

Inside the "define buttons" procedure, you use the ENVI
routine ENVI_DEFINE_MENU_BUTTON to create your buttons.
Keywords allow you to name and position the button in
relation to other buttons, etc.

Apparently, this has been an undocumented feature for a
long time, but it has been exposed in this release. It is
very slick, I think.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL Version Number Warning
Next Topic: Re: Draw IDLgrImage and IDLgrPlot in the correct order

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:11:07 PDT 2025

Total time taken to generate the page: 0.71998 seconds