X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 30 May 2007 10:56 AM by  anon
concerning modal dialogues
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
30 May 2007 10:56 AM
    Hi everyone, I am working on a GUI right now whose purpose is to capture images from a detector. One of the things that this program does is run through a timed sequence (for example, a reset, then a user-specified integration time, then a read, etc). To keep the program functional during these timed sequences, I avoided using IDL's "wait" commands and instead implemented widget timing, where you specify how long you want IDL to wait before calling a certain function or procedure. This allows the user to do something else in the GUI even while a timed sequence is in progress. However, I just realized today that modal dialogues put a halt to everything, even widget timer commands. In my program, I use dialog_pickfile (a modal dialog) to open previously captured images. I want the user to be able to open previous images while a timed sequence is in progress. But the modal dialog generated by dialog_pickfile makes this impossible - it freezes the sequence until the user finally decides on what file he wants to open. Does anyone know of a way I can overcome this problem and make dialog_pickfile non-modal? I know this should be possible because in my program I have other event-awaiting windows (which I created myself) that can be opened and closed but don't interrupt the timing sequence. I could even imagine creating my own version of dialog_pickfile. But it seems like there should be an easier solution. So, if anyone knows how to make dialog_pickfile NOT freeze everything else, please get back to me. Thanks, Anton

    Deleted User



    New Member


    Posts:
    New Member


    --
    30 May 2007 10:56 AM
    Anton, DIALOG_PICKFILE is a relatively direct interface from IDL to the operating system's file chooser dialog. I have never seen any application that could initialize this except as a modal dialog window. The only workaround that I can think of would be to make your own simpler file chooser that is non-modal. IDL's WIDGET_TREE can be set up with the help of FILE_SEARCH and - presumably - WIDGET_LIST to dynamically show the entire file system probably in less than a couple of dozen lines of code. The only downside is that it would not have the same "look and feel" of the system file chooser. James Jones
    You are not authorized to post a reply.