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

Home » Public Forums » archive » Arrays: strange feature ?!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Arrays: strange feature ?! [message #20002 is a reply to message #19877] Fri, 12 May 2000 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
I wrote the other day:

> Some of us find in IDL the same subtle intelligence
> that pervades the Universe. If it seems crazy to us,
> it is because we haven't evolved our consciousness
> enough to perceive the underlying plan.

And I can't believe the number of unsolicited e-mails
I got from the skeptics. You guys need to do a little
reading to open your minds. Here is a good web page
to get you in the proper mood for understanding the
journey...

http://www.thegreatillusion.com/

Cheers,

David

P.S. Speaking of strange features, I ran into a little one
that set me back for a couple of minutes in an IDL course
I was teaching last week. I was trying something new
(normally my spontaneous flights of fancy are well rehearsed,
but this one wasn't, although I really didn't expect any
problems with it), which was my first mistake.

I decided to write a widget program where we could click
on an image and print the image value back in a CW_Field
widget. (Normally, I disdain CW_Field widgets because the
text field doesn't look editable on PC platforms, but this
time that was exactly the effect I was going for.)

In any case, when we tried to put the image value into
the CW_Field widget:

Widget_Control, info.fieldID, Set_Value=imageValue

nothing would show up on the display! (No, I didn't have
the Modal keyword set, Dave.) This was very strange. I've
only written programs like this about a million times,
and the value *always* shows up where it is suppose to.

What in the world? Bug in IDL 5.3.1? Corrupted installation?
Coyote out of his teepee and loose in Milwaukee?

No, it turned out that the image value was an integer
value (which is what we had told CW_Field to expect),
but somehow in doing the conversion from integer to
string to get the value in the the text widget, the
integer was getting converted to blank characters.
I haven't had time to investigate the details of this.
(And after I thought about it I understood why it might
happen with bytes, but I still don't know why it
happened with integers.)

In any case, the problem was fixed by converting
the image value to a float before we tried to put it
into CW_Field. But it gave me a couple more gray hairs,
which I *certainly* didn't need. :-(

--
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 5.3: IDLgrVolume,CUTPLANES=
Next Topic: POLY_FIT gives wrong answer !

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

Current Time: Fri Oct 10 13:31:46 PDT 2025

Total time taken to generate the page: 0.08525 seconds