Re: Widget draw problems... [message #15179 is a reply to message #15178] |
Thu, 29 April 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Luis Oliveira (euluis@netscape.net) writes:
> I have the following message error on my program, when I destroy a draw
> widget and create another in the same base widget (it isn't a top level
> base). But this doesn't happen all the times, just when I switch between the
> widgets without drawing more than one time to each!
>
> Also Windows�s GDI resources went low when I caused many of these errors. Next
> goes some output that I copied to this message:
>
> IDL> .STEP
> % Program caused arithmetic error: Floating illegal operand
> ;self.wdvel contains the ID of the draw widget:
> IDL> help, self.wdvel
> <Expression> LONG = 273
>
> ;The statement that caused the error was:
> widget_control, self.WDvel, /DESTROY
> ;self.WDvel is a draw widget ID.
>
> If you've stepped on this problem, please help me!
There is not enough information here to solve this
problem, but here are two things to think about:
1. Why in the world would you be destroying a draw
widget and creating another one? and,
2. Are you certain you are not confusing the draw widget's
identifier with the draw widget's window index number,
which is the *value* of the draw widget.
We would have to see more code to be certain of what you
are doing. But I've been racking my brain unsuccessfully
trying to think of a reason to destroy a draw widget. :-(
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
|
|
|