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

Home » Public Forums » archive » strAnswer = ReadUserInput()
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
strAnswer = ReadUserInput() [message #35520] Wed, 25 June 2003 02:12 Go to next message
Gert Van de Wouwer is currently offline  Gert Van de Wouwer
Messages: 21
Registered: January 2002
Junior Member
Hi,


I would like to have a function:

strAnswer = ReadUserInput()

readUserInput would then create a (modal) base, have a text-field where the
user types his tekst. When the base is
closed, the contents of the textfield are returnedn in strAnswer.


I've come up with this:

strTemp=''
ptr1 = ptr_new(strTemp)
ptr2 = ptr1
TextFieldBase, ptr1, group_leader=... ;this guy modifies *ptr1
...
at this point, ptr1 seems to be destroyed (by who, why?), but p2 points to
whatever is been filled in in textfieldbase.


It seems to work, but are there any pitfalls here? Is there any better way
to do this?
thanks for any input,

Gert
Re: strAnswer = ReadUserInput() [message #35647 is a reply to message #35520] Fri, 27 June 2003 01:48 Go to previous message
Gert Van de Wouwer is currently offline  Gert Van de Wouwer
Messages: 21
Registered: January 2002
Junior Member
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.196363d89f0de68f98968f@news.frii.com...
>
> Try my TEXTBOX program:
>
Thanks for the info David. I just found out that cw-form also does something
similar.
Re: strAnswer = ReadUserInput() [message #35666 is a reply to message #35520] Wed, 25 June 2003 07:47 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gert Van de Wouwer writes:

> I would like to have a function:
>
> strAnswer = ReadUserInput()
>
> readUserInput would then create a (modal) base, have a text-field where the
> user types his tekst. When the base is
> closed, the contents of the textfield are returnedn in strAnswer.
>
>
> I've come up with this:
>
> strTemp=''
> ptr1 = ptr_new(strTemp)
> ptr2 = ptr1
> TextFieldBase, ptr1, group_leader=... ;this guy modifies *ptr1
> ...
> at this point, ptr1 seems to be destroyed (by who, why?), but p2 points to
> whatever is been filled in in textfieldbase.
>
>
> It seems to work, but are there any pitfalls here? Is there any better way
> to do this?
> thanks for any input,

Try my TEXTBOX program:

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

And here is an article that describes how to write
these pop-up dialog widgets correctly:

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

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MORPH_XYZ and values keyword
Next Topic: resolve_routine and the IDL search path

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

Current Time: Wed Oct 08 17:34:59 PDT 2025

Total time taken to generate the page: 0.00456 seconds