Re: Theoretical Programmers Wanted [message #36585] |
Wed, 08 October 2003 01:24  |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <MPG.19ed1529cceabfd989704@news.frii.com>, "David Fanning"
<david@dfanning.com> wrote:
> 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
>
Not being able to double-click to run the save file (Linux) I may be
missing something, but the save file works if it is restored from within
IDL for me, with or without the call to XManager.
Could it be the /no_block keyword that's stopping it counting when you
double-click to run it?
Chris.
|
|
|