comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: WIDGET_SLIDER bug !?!

WIDGET_SLIDER bug !?!
type: item
description: Hi everybody, i am using IDL 4.01 on an UltraSparc running Solaris 2.5. Recently i created a WIDGET_SLIDER with a preset MIN of 0 and an undefined MAX (which defaults to 100). As i tried to change the MAX-value with WIDGET_CONTROL,,/SET_SLIDER_MAX, values LE 3 caused a segmentation fault. The same error occurred with completely uninitialized MIN/MAX values. Only after i set the initial MAX value to 1, the segmentation fault disappeared. b = widget_base() s = widget_slider(b, min=0, xsize=200, /suppress_value) widget_control, b, /realize print,5 & widget_control,s,set_slider_max=5 print,4 & widget_control,s,set_slider_max=4 print,3 & widget_control,s,set_slider_max=3 print,2 & widget_control,s,set_slider_max=2 print,1 & widget_control,s,set_slider_max=1 and the IDL output: IDL> b = widget_base() IDL> s = widget_slider(b, min=0, xsize=200, /suppress_value) IDL> widget_control, b, /realize IDL> print,5 & widget_control,s,set_slider_max=5 5 IDL> print,4 & widget_control,s,set_slider_max=4 4 IDL> print,3 & widget_control,s,set_slider_max=3 3 % Program caused arithmetic error: Floating illegal operand % Detected at $MAIN$ Segmentation Fault If you use the following: b = widget_base() s = widget_slider(b, min=0, max=1, xsize=200, /suppress_value) widget_control, b, /realize print,5 & widget_control,s,set_slider_max=5 print,4 & widget_control,s,set_slider_max=4 print,3 & widget_control,s,set_slider_max=3 print,2 & widget_control,s,set_slider_max=2 print,1 & widget_control,s,set_slider_max=1 you will get the expected result: IDL> b = widget_base() IDL> s = widget_slider(b, min=0, max=1, xsize=200, /suppress_value) IDL> widget_control, b, /realize IDL> print,5 & widget_control,s,set_slider_max=5 5 IDL> print,4 & widget_control,s,set_slider_max=4 4 IDL> print,3 & widget_control,s,set_slider_max=3 3 IDL> print,2 & widget_control,s,set_slider_max=2 2 IDL> print,1 & widget_control,s,set_slider_max=1 1 IDL> Did anybody else came across this error and/or knows a reason for this beh…
creator: Hans-Martin v.Stockha
date: 1997-02-07T08:00:00-00:00