| Re: Theoretical Programmers Wanted [message #36587 is a reply to message #36585] |
Tue, 07 October 2003 18:24  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Now, here is another file, very similar to the first.
>
> PRO Test2
> tlb = Widget_Base(Column=1, XOffset=200, YOffset=100)
> label = Widget_Label(tlb, Value='000', XSize=100, /Align_Center)
> Widget_Control, tlb, /Realize, Set_UValue=label
> XManager, 'test2', tlb, /No_Block
> FOR j=0,49 DO BEGIN
> Widget_Control, label, Set_Value=String(j,format='(I3.3)')
> Wait, 0.1
> ENDFOR
> Widget_Control, tlb, /Destroy
> END
>
> When you run it, a graphical user interface appears and the
> label counts up to 49. Perfect! But now you make a save file
> out of this:
>
> IDL> .compile test2
> IDL> Resolve_All
> IDL> Save, File='test2.sav', /Routines
>
> When you quit IDL and double click the save file, you get
> the label appearing in the top-level base, but no count up
> on the label. It stays stuck at 000. :-(
>
> Here's my theoretical question: Why?
Note that if I comment out the XManager call, TEST2 works
perfectly as a save file. I actually think I understand this
whole business in the sort of fuzzy, beer-blurry way that you
understand the waitress taking your order is in love with you.
But I'm just finding it hard to explain it to others.
Perhaps I need fresh words. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|