WIDGET_CONTROL, /HOURGLASS ? [message #13242] |
Thu, 29 October 1998 00:00  |
Eric Frans
Messages: 13 Registered: October 1998
|
Junior Member |
|
|
IDL folks,
I recently discovered the ability IDL 5.1 has to change the cursor to an
hourglass, which is particularly helpful during time consuming processes
like reading or writing large files. So I decided to use the line:
WIDGET_CONTROL, /HOURGLASS
in a procedure before reading in potentionally huge input files. The
hourglass cursor appeared fine, but then when I launched a widget from
the procedure after the input file had been read, the hourglass cursor
didn't change back to normal, so I wasn't able to modify the widget
entries at all. Is there some sort of clear command I need?
Thanks in advance for any help!
- Eric Frans
|
|
|
Re: WIDGET_CONTROL, /HOURGLASS ? [message #13323 is a reply to message #13242] |
Fri, 30 October 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Eric Frans (epfrans@west.raytheon.com) writes:
> David Fanning wrote:
>>
>> I'm not sure it's a bug. This program worked perfectly on
>> my Windows NT machine. The cursor turned from an hourglass
>> to a pointer as soon as the loop was finished, just like
>> I thought it would. What kind of machine are you running
>> on?
>
> Yeah, you're right it turns from an hourglass to a pointer after the
> loop is finished, but what happens after you select 'Yes' at the
> dialog_message box, click on the plot and then move your cursor to the
> widget? I tried this on Windows 95 and Windows NT machines here, and
> both times the cursor changed back to an hourglass when the cursor moved
> over the widget, which prevented the 'SUBMIT' button from working.
> However, if you select 'No' at the dialog_message box and then move to
> the widget, the cursor remains an arrow and the 'SUBMIT' button works.
> Weird.
Ah, yes, I see what you mean. Ouch!
I don't honestly know what is happening here, although
I am not quite ready to call it a bug yet. There is a
very famous rule of thumb (at least if you attend my
IDL programming classes) that says don't EVER use the
cursor command in a widget program.
True, this is not a widget program, but I wonder if using
a widget command (Widget_Control, /Hourglass) somehow gets
the program to "think" it is a widget program, perhaps
by getting XManager into a funny state. It is as if the
block on the WID_TEST program is from inside another
widget program... I'm grasping at straws here.
In any case, you may want to re-think your program design.
Why not make the whole think widgetized? Or, you could try
using the Device, Cursor_Standard=xxx configuration instead.
I tried this just now, but I couldn't get an hourglass
to appear even though I typed just what the documentation
said. (Another can of worms, probably.)
Sorry I can't be more helpful.
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Note: A copy of this article was e-mailed to the original poster.
|
|
|
Re: WIDGET_CONTROL, /HOURGLASS ? [message #13324 is a reply to message #13242] |
Fri, 30 October 1998 00:00  |
Eric Frans
Messages: 13 Registered: October 1998
|
Junior Member |
|
|
David Fanning wrote:
>
> I'm not sure it's a bug. This program worked perfectly on
> my Windows NT machine. The cursor turned from an hourglass
> to a pointer as soon as the loop was finished, just like
> I thought it would. What kind of machine are you running
> on?
Yeah, you're right it turns from an hourglass to a pointer after the
loop is finished, but what happens after you select 'Yes' at the
dialog_message box, click on the plot and then move your cursor to the
widget? I tried this on Windows 95 and Windows NT machines here, and
both times the cursor changed back to an hourglass when the cursor moved
over the widget, which prevented the 'SUBMIT' button from working.
However, if you select 'No' at the dialog_message box and then move to
the widget, the cursor remains an arrow and the 'SUBMIT' button works.
Weird.
- Eric Frans
|
|
|
Re: WIDGET_CONTROL, /HOURGLASS ? [message #13325 is a reply to message #13242] |
Fri, 30 October 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Eric Frans (epfrans@west.raytheon.com) writes:
> David Fanning wrote:
>>
>> You could try this:
>>
>> Widget_Control, Hourglass = 0
>>
> Sorry, I forgot to mention I tried that also and it didn't work. I also
> failed to mention that after I read the file (and before launching the
> widget) I used the CURSOR procedure allow selection of a point on a
> plot. The CURSOR procedure seems to be causing the HOURGLASS problem
> with the widget. Attached is a simple procedure (cursor_test.pro) to
> illustrate the problem I'm having. If anyone can figure how to fix this
> apparent bug, I'd really appreciate you sharing the solution. Thanks!
I'm not sure it's a bug. This program worked perfectly on
my Windows NT machine. The cursor turned from an hourglass
to a pointer as soon as the loop was finished, just like
I thought it would. What kind of machine are you running
on?
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Note: A copy of this article was e-mailed to the original poster.
|
|
|