[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XMANAGER question
Daniel Peduzzi (peduzzi@mediaone.net) writes:
> I'm seeing an inconsistency in the behavior of a widget program which is being
> restored from a save file...depending upon how it is restored. The two ways I am
> restoring the same program are:
>
> 1) % idl -rt=myprogram.sav
> 2) IDL> RESTORE, file='myprogram.sav'
>
> The demo program below, which I've named popup.pro, creates two simple
> non-blocking windows that are dismissed by pressing the "Done" pushbutton.
> I create the 'sav' file by:
>
> IDL> .compile popup
> IDL> resolve_all
> IDL> save, /routine, file='popup.sav'
>
> Now, if I issue
>
> IDL> RESTORE, file='popup.sav'
>
> and type 'main', I get two working windows which can be dismissed in either
> order (what I would expect.) However, if I use idl -rt=popup.sav at the UNIX
> prompt, the first window blocks, and I don't see the second window until I
> dismiss the first.
>
> I looked through the IDL Runtime Guide, but didn't see anything pertaining to
> this kind of issue. Has anybody else encountered this kind of behavior? Or
> am I missing something?
I don't think you are missing anything. I just don't think
you have read enough computer documentation to be adept at
reading between the lines yet. :-)
I take it that what the technical writer means by the "main
program blocking" is that the IDL command line is also blocked.
Meaning that the first widget program to call XMANAGER will
block. And although the documentation doesn't spell this out, it
does make a perverse kind of sense to me. I mean, how could
it be otherwise in a run-time license?
In any case, you can get the program to work the way you
expect by changing the NO_BLOCK keyword in PopUp1 to
JUST_REG. You will still block on the XMANAGER command in
PopUp2, but this won't cause you any difficulties at all.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155