Re: Widgets and classes [message #13123] |
Wed, 07 October 1998 00:00 |
J.D. Smith
Messages: 214 Registered: August 1996
|
Senior Member |
|
|
Alexander Zora wrote:
>
> IDL programmers,
>
> I am wondering how to fix the problems that is stated this way:
> "Class of specified widget has no value"
> what does this mean? and how do I fix it?
>
> This message is in reference to a widget_droplist
>
> Thanks.
It just means that droplists don't have an associated value available
with widget_control, droplist, get_value=val. Most widgets do have a
value obtainable this way. But hope is not lost. This unfortunate bit
of IDL inconsistency is overcome in most cases with:
sel=widget_info(droplist,/DROPLIST_SELECT)
Why this method instead of the get_value route? We may never know. If
you are really after the list in the droplist (not just the selected
list item index), you'll have to store it aside when created, and use
that copy. This is the same as with widget_list. Once you set a list
into either, you can't get them back out! You can also obtain the
number of list elements with widget_info. See widget_info().
Good Luck,
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
|
|
|