comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problems with CW_FSLIDER
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problems with CW_FSLIDER [message #11983] Mon, 22 June 1998 00:00 Go to next message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Heiko H�nnefeld (hhuenne@desy.de) writes:

> <P>I am using IDL 5.1 on a LINUX PC.
>
> <P>There is something wrong with the CW_FSLIDER procedure.
> <BR>If you create the Widget e.g. with
>
> <P><B>IDL>&nbsp;</B>base=WIDGET_BASE()&nbsp;
> <BR><B>IDL></B> axes = CW_FSLIDER(base,VALUE=0.0, MAXIMUM=300.0, MINIMUM=-300.0,
> /EDIT,FRAME=5)
> <BR><B>IDL></B>&nbsp;WIDGET_CONTROL, /REALIZE, base
>
> <P>The current value is set to the Slider minimum, -300.
> <BR>The bad thing is, that IDL&nbsp;takes this value for further calculations
> in my ..._EVENT procedure.
>
> <P>Any other value instead of zero works.

Must be a LINUX thing. The floating slider works perfectly
on my Windows machine running IDL 5.1.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Problems with CW_FSLIDER [message #12108 is a reply to message #11983] Wed, 24 June 1998 00:00 Go to previous message
dlhopols is currently offline  dlhopols
Messages: 10
Registered: April 1998
Junior Member
Hi again Heiko,
I made the changes you suggested and I still don't seem to have any problems.
At least it doesn't seem to be a problem with IDl 5.0 and the Unix
on my SGI. Maybe this rules out some things. Good luck.

Rose





-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
Re: Problems with CW_FSLIDER [message #12114 is a reply to message #11983] Tue, 23 June 1998 00:00 Go to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
Heiko Hünnefeld wrote:

>>
>
> Hi all,
>
> I just observed a very strange thing:
> I tried (as root) to find out, where the bug occurs in the CW_FSLIDER
> procedure,
> and then I closed the file again without changes.
> After new compilation the problem went away !
> I do not know why, but it works now on the LINUX-PC, but still not on
> the UNIX workstation,
> where I can not become root-user.
>
> No idea, what happened.
> Heiko
>

May be that's the file before you'd saved it had some special escape
sequences like 13b.
idl on unix will remove them in the way you did.

I have a lot of problems with @journal without a "blanc" and a ";" at the
end.
Because if the file was created on a PC / windows the unix won't find a
file @journal^M.

May be that's your problem is something like this.


--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
Re: Problems with CW_FSLIDER [message #12118 is a reply to message #11983] Tue, 23 June 1998 00:00 Go to previous message
Alex Schuster is currently offline  Alex Schuster
Messages: 124
Registered: February 1997
Senior Member
Heiko Hünnefeld wrote:

> try your test program again and change line 8 to the following:
>
> axes = CW_FSLIDER(base,VALUE=0.0, $
> MAXIMUM=300.0, MINIMUM=-300.0, /EDIT,FRAME=5)
>
> The effect is, that the current value is set to -300.
> If, however, you change line 8 to
>
> axes = CW_FSLIDER(base,VALUE=53.1, $
> MAXIMUM=300.0, MINIMUM=-300.0, /EDIT,FRAME=5)
>
> it works fine as it should.

It works with any value except for 0.0. Looks like... right, again RSI
uses KEYWORD_SET insteaf of N_ELEMENTS to check for parameters. Hello
RSI, this sucks!!

Our cw_fslider.pro of IDL 4 has this line in it:
IF NOT (KEYWORD_SET(val)) THEN val = min

In IDL 5, is is:
IF N_ELEMENTS(val) EQ 0 THEN val = min

We are using IDL 5.03, so I guess RSI fixed this in this update. Of
course they don't tell us in the modification history of the source
code.

Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
Re: Problems with CW_FSLIDER [message #12119 is a reply to message #11983] Tue, 23 June 1998 00:00 Go to previous message
Heiko H�nnefeld is currently offline  Heiko H�nnefeld
Messages: 7
Registered: June 1998
Junior Member
>

Hi all,

I just observed a very strange thing:
I tried (as root) to find out, where the bug occurs in the CW_FSLIDER
procedure,
and then I closed the file again without changes.
After new compilation the problem went away !
I do not know why, but it works now on the LINUX-PC, but still not on
the UNIX workstation,
where I can not become root-user.

No idea, what happened.
Heiko


> --
>
> Heiko H�nnefeld
>
> HASYLAB / DESY

Notkestr. 85
22603 Hamburg
Tel.: 040 / 8998-2698
Fax.: 040 / 8998-2787
> e-mail: hhuenne@desy.de
>
>
>
>
Re: Problems with CW_FSLIDER [message #12121 is a reply to message #11983] Tue, 23 June 1998 00:00 Go to previous message
Heiko H�nnefeld is currently offline  Heiko H�nnefeld
Messages: 7
Registered: June 1998
Junior Member
dlhopols@knmi.nl wrote:

> Hi Heiko,
> I run SGI/IRIX UNIX with IDL 5.0 and, using the following program (which you
> gave as a sample):
>
> =======================================
> pro test_slider_event,event
> print,'--------- begin test_slider_event structure ----------------'
> help,event,/structure
> print,'--------- end test_slider_event structure ----------------'
> END
> pro test_slider
> base=WIDGET_BASE()
> axes = CW_FSLIDER(base,VALUE=-300.0, $
> MAXIMUM=300.0, MINIMUM=-300.0, /EDIT,FRAME=5)
> WIDGET_CONTROL, /REALIZE, base
> xmanager,'test_slider',base, $
> event_handler = 'test_slider_event',/no_block
> END
> ============================================================ ====
>
> And I get as a result of the print, where the VALUE varies as I would expect.:
>
> IDL>
> --------- begin test_slider_event structure ----------------
> ** Structure <1035b408>, 5 tags, length=20, refs=1:
> ID LONG 11
> TOP LONG 10
> HANDLER LONG 10
> VALUE FLOAT 130.909
> DRAG INT 0
> --------- end test_slider_event structure ----------------
>
> Does this simulate what you expect? Let me know if there's another test that
> I can run. I wasn't sure what you meant by changing the initial value.
>
> Rose
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading

Hi Rose,

try your test program again and change line 8 to the following:

axes = CW_FSLIDER(base,VALUE=0.0, $
MAXIMUM=300.0, MINIMUM=-300.0, /EDIT,FRAME=5)

The effect is, that the current value is set to -300.
If, however, you change line 8 to

axes = CW_FSLIDER(base,VALUE=53.1, $
MAXIMUM=300.0, MINIMUM=-300.0, /EDIT,FRAME=5)

it works fine as it should.

By the way, I am sorry for posting the last message in HTML - thank you for your
e-mails.

Heiko

--

Heiko H�nnefeld

HASYLAB / DESY

Notkestr. 85
22603 Hamburg
Tel.: 040 / 8998-2698
Fax.: 040 / 8998-2787
e-mail: hhuenne@desy.de
Re: Problems with CW_FSLIDER [message #12123 is a reply to message #11983] Tue, 23 June 1998 00:00 Go to previous message
dlhopols is currently offline  dlhopols
Messages: 10
Registered: April 1998
Junior Member
In article <358E5187.AD912CB7@desy.de>,
"Heiko H�nnefeld" <hhuenne@desy.de> wrote:

> <P>Second, we tested the same on UNIX alpha workstations, and observed
> the same phenomena.
> <BR>Does anybody see the same feature&nbsp;?
>
> <P>Thanks,
> <BR>Heiko

Hi Heiko,
I run SGI/IRIX UNIX with IDL 5.0 and, using the following program (which you
gave as a sample):

=======================================
pro test_slider_event,event
print,'--------- begin test_slider_event structure ----------------'
help,event,/structure
print,'--------- end test_slider_event structure ----------------'
END
pro test_slider
base=WIDGET_BASE()
axes = CW_FSLIDER(base,VALUE=-300.0, $
MAXIMUM=300.0, MINIMUM=-300.0, /EDIT,FRAME=5)
WIDGET_CONTROL, /REALIZE, base
xmanager,'test_slider',base, $
event_handler = 'test_slider_event',/no_block
END
============================================================ ====

And I get as a result of the print, where the VALUE varies as I would expect.:

IDL>
--------- begin test_slider_event structure ----------------
** Structure <1035b408>, 5 tags, length=20, refs=1:
ID LONG 11
TOP LONG 10
HANDLER LONG 10
VALUE FLOAT 130.909
DRAG INT 0
--------- end test_slider_event structure ----------------

Does this simulate what you expect? Let me know if there's another test that
I can run. I wasn't sure what you meant by changing the initial value.


Rose







-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Longword plotting problems...
Next Topic: Q: 3-D objects in spherical coordinates

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:27:17 PDT 2025

Total time taken to generate the page: 0.00765 seconds