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

Home » Public Forums » archive » Re: Simple question: promptusertext method
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: Simple question: promptusertext method [message #58936] Wed, 27 February 2008 13:52 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Selim.Ta@gmail.com writes:

> I'm a novice in IDL, so please bear with me. I want a procedure to
> display a prompt with a text field. From what I understand,
> promptusertext is the method I should use. This said, I can't get it
> to work properly. The prompt never displays and just registers the
> user's entry as 0. Here's my code:
>
> PRO ...
>
> ...
>
> obj = Obj_New("IDLitIMessaging")
>
> result = obj->promptusertext('...', answer, title='...')
>
> ...
>
> END
>
> What am I doing wrong?

If you are a novice IDL user, I seriously doubt you
are programming iTools. So I don't think IDLitIMessaging
is what you want. :-)

Why don't you try something a great deal simpler. Here
is a simple pop-up dialog that does what you want:

http://www.dfanning.com/programs/textbox.pro

You use it like this:

answer = TextBox(Label='What is your favorite color?', $
Title='Type your favorite color', Cancel=cancelled)
IF cancelled THEN RETURN

You can read more about how it is created here:

http://www.dfanning.com/widget_tips/popup.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Simple question: promptusertext method [message #58981 is a reply to message #58936] Fri, 29 February 2008 12:04 Go to previous message
Wasit.Weather is currently offline  Wasit.Weather
Messages: 62
Registered: February 2008
Member
On Feb 27, 3:52 pm, David Fanning <n...@dfanning.com> wrote:
> Selim...@gmail.com writes:
>> I'm a novice in IDL, so please bear with me. I want a procedure to
>> display a prompt with a text field. From what I understand,
>> promptusertext is the method I should use. This said, I can't get it
>> to work properly. The prompt never displays and just registers the
>> user's entry as 0. Here's my code:
>
>> PRO ...
>
>> ...
>
>> obj = Obj_New("IDLitIMessaging")
>
>> result = obj->promptusertext('...', answer, title='...')
>
>> ...
>
>> END
>
>> What am I doing wrong?
>
> If you are a novice IDL user, I seriously doubt you
> are programming iTools. So I don't think IDLitIMessaging
> is what you want. :-)
>
> Why don't you try something a great deal simpler. Here
> is a simple pop-up dialog that does what you want:
>
>   http://www.dfanning.com/programs/textbox.pro
>
> You use it like this:
>
>    answer = TextBox(Label='What is your favorite color?', $
>        Title='Type your favorite color', Cancel=cancelled)
>    IF cancelled THEN RETURN
>
> You can read more about how it is created here:
>
>   http://www.dfanning.com/widget_tips/popup.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- Hide quoted text -
>
> - Show quoted text -

Hi David,
When I run the TextBox program, I stopped saying
Attempt to call undefined procedure/function: 'TEXTBOX'.
Execution halted at: $MAIN$

Did I miss something?
Thanks!
Re: Simple question: promptusertext method [message #58982 is a reply to message #58936] Fri, 29 February 2008 12:02 Go to previous message
Wasit.Weather is currently offline  Wasit.Weather
Messages: 62
Registered: February 2008
Member
On Feb 27, 3:52 pm, David Fanning <n...@dfanning.com> wrote:
> Selim...@gmail.com writes:
>> I'm a novice in IDL, so please bear with me. I want a procedure to
>> display a prompt with a text field. From what I understand,
>> promptusertext is the method I should use. This said, I can't get it
>> to work properly. The prompt never displays and just registers the
>> user's entry as 0. Here's my code:
>
>> PRO ...
>
>> ...
>
>> obj = Obj_New("IDLitIMessaging")
>
>> result = obj->promptusertext('...', answer, title='...')
>
>> ...
>
>> END
>
>> What am I doing wrong?
>
> If you are a novice IDL user, I seriously doubt you
> are programming iTools. So I don't think IDLitIMessaging
> is what you want. :-)
>
> Why don't you try something a great deal simpler. Here
> is a simple pop-up dialog that does what you want:
>
>   http://www.dfanning.com/programs/textbox.pro
>
> You use it like this:
>
>    answer = TextBox(Label='What is your favorite color?', $
>        Title='Type your favorite color', Cancel=cancelled)
>    IF cancelled THEN RETURN
>
> You can read more about how it is created here:
Hi David,
I tried that program TextBox. I can compile it but can no trun.
Following is the error message.

Attempt to call undefined procedure/function: 'TEXTBOX'.
Execution halted at: $MAIN$
Did I miss something?

Thanks!

>
>   http://www.dfanning.com/widget_tips/popup.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- Hide quoted text -
>
> - Show quoted text -
Re: Simple question: promptusertext method [message #58999 is a reply to message #58936] Thu, 28 February 2008 09:58 Go to previous message
Selim.Ta is currently offline  Selim.Ta
Messages: 2
Registered: February 2008
Junior Member
On Feb 27, 2:52 pm, David Fanning <n...@dfanning.com> wrote:
> Selim...@gmail.com writes:
>> I'm a novice in IDL, so please bear with me. I want a procedure to
>> display a prompt with a text field. From what I understand,
>> promptusertext is the method I should use. This said, I can't get it
>> to work properly. The prompt never displays and just registers the
>> user's entry as 0. Here's my code:
>
>> PRO ...
>
>> ...
>
>> obj = Obj_New("IDLitIMessaging")
>
>> result = obj->promptusertext('...', answer, title='...')
>
>> ...
>
>> END
>
>> What am I doing wrong?
>
> If you are a novice IDL user, I seriously doubt you
> are programming iTools. So I don't think IDLitIMessaging
> is what you want. :-)
>
> Why don't you try something a great deal simpler. Here
> is a simple pop-up dialog that does what you want:
>
> http://www.dfanning.com/programs/textbox.pro
>
> You use it like this:
>
> answer = TextBox(Label='What is your favorite color?', $
> Title='Type your favorite color', Cancel=cancelled)
> IF cancelled THEN RETURN
>
> You can read more about how it is created here:
>
> http://www.dfanning.com/widget_tips/popup.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Thank you very much, Mr. Fanning. I've been able to complete my
code :-).

Best,
Selim
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Posting html form data with idlNetURL?
Next Topic: Re: Overlaying a contour on a small image

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

Current Time: Wed Oct 08 17:54:40 PDT 2025

Total time taken to generate the page: 0.00555 seconds