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

Home » Public Forums » archive » Re: How 2 read a matrix to a widget?
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: How 2 read a matrix to a widget? [message #69613] Thu, 04 February 2010 06:49
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Feb 4, 6:05 am, David Fanning <n...@dfanning.com> wrote:
> Dave_Poreh writes:
>> I want to read a matrix to a widget. For single number reading usually
>> I use:
>> READ, X, PROMPT = ' '
>> Now I want to read a row (or a matrix) to the widget .
>> Could anyone give me an idea?
>
> Humm. That doesn't seem very widgety to me. :-(
>
> How about creating a text widget, allowing the user
> to type as many numbers as they want there, then
> taking that line of code, as a string, and using
> STRSPLIT to convert the values to numbers:
>
>    numbers = Float(StrSplit(textline, /Extract))
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Wow, Thanks David
It is great idea. Works perfectly.
Cheers
Re: How 2 read a matrix to a widget? [message #69614 is a reply to message #69613] Thu, 04 February 2010 06:05 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dave_Poreh writes:

> I want to read a matrix to a widget. For single number reading usually
> I use:
> READ, X, PROMPT = ' '
> Now I want to read a row (or a matrix) to the widget .
> Could anyone give me an idea?

Humm. That doesn't seem very widgety to me. :-(

How about creating a text widget, allowing the user
to type as many numbers as they want there, then
taking that line of code, as a string, and using
STRSPLIT to convert the values to numbers:

numbers = Float(StrSplit(textline, /Extract))

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Announcing GDL 0.9rc4
Next Topic: Re: performing multiple histograms without loops

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

Current Time: Fri Oct 10 04:43:48 PDT 2025

Total time taken to generate the page: 0.48070 seconds