Re: WIDGET REALIZATION BUG in 5.5 ? [message #28760] |
Tue, 08 January 2002 09:00  |
Pavel A. Romashkin
Messages: 531 Registered: November 2000
|
Senior Member |
|
|
If you create a button and then call Widget_Control on it in the same
routine, this button is not realized yet, I think. You can check on that
by inserting a breakpoint befor the end of the routine and checking if
your button is displayed.
None of my business, but why create a new button every time? There are
other widgets for multiple choice solutions, and it is easy to change
properties of an existing button.
Good luck,
Pavel
Martin Lowry wrote:
>
> Hi All,
>
> I have just installed 5.5 and came across an error I hadn't seen in
> 5.4.
>
> I use a 'PRO_SET_VALUE' routine to create a button each time I load an
> image file. This button's UVALUE carries information about the file
> and serves as a launching button for the file it represents. At the
> end of the routine I use WIDGET_CONTROL to send an event to the just
> created button to make it the 'currently' active button and update
> some display labels. Unfortunately IDL comes back with the following
> message:
>
> % WIDGET_CONTROL: Request not allowed on unrealized widget.
>
> This seems strange as the button must be realized, albeit implicitly,
> since it appears on screen!
>
> Any ideas how I might prevent the error?
>
> Cheers!
|
|
|