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

Home » Public Forums » archive » Re: Problem with TextBox from dfanning.com
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: Problem with TextBox from dfanning.com [message #40460] Wed, 11 August 2004 06:09 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lloyd Watkin writes:

> I'm using David Fanning's widget from his website. I have come across
> a problem however. Here is my calling sequence:
>
> IFCANCELLED: ; Label if box is cancelled
> inputvalue = TextBox(Title="Please enter value:", Label=inputname,
> Cancel=cancelled, value=string(inputvalue2))
> IF (cancelled OR (inputvalue EQ "")) THEN begin
> warning = DIALOG_MESSAGE("A value must be
> entered",TITLE="Warning!")
> stop
> GOTO, IFCANCELLED
> endif
>
> The problem is that if I enter a null string or click the cancel
> button I get the following error message back out:
>
> "WIDGET_LABEL: String expression required in this contact: LABEL."
>
> I don't understand this at all! Any help on this much appreciated.

It means that whatever you have in the variable "inputname"
isn't a string. Try putting a "HELP, inputname" just before
the call the TEXTBOX to see what it is.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Problem with TextBox from dfanning.com [message #40529 is a reply to message #40460] Fri, 13 August 2004 06:57 Go to previous message
lloyd is currently offline  lloyd
Messages: 16
Registered: February 2003
Junior Member
[...]
>> I don't understand this at all! Any help on this much appreciated.
>
> It means that whatever you have in the variable "inputname"
> isn't a string. Try putting a "HELP, inputname" just before
> the call the TEXTBOX to see what it is.

For some reason I was initially entering a string but it was returning
inputname as a float (?!?!). I got around this by copying the input
string into a temporary variable and copying it back to the original
variable if the textbox needed to be reopened.

Thanks

Lloyd
Re: Problem with TextBox from dfanning.com [message #40530 is a reply to message #40460] Fri, 13 August 2004 06:57 Go to previous message
lloyd is currently offline  lloyd
Messages: 16
Registered: February 2003
Junior Member
[...]
>> I don't understand this at all! Any help on this much appreciated.
>
> It means that whatever you have in the variable "inputname"
> isn't a string. Try putting a "HELP, inputname" just before
> the call the TEXTBOX to see what it is.

For some reason I was initially entering a string but it was returning
inputname as a float (?!?!). I got around this by copying the input
string into a temporary variable and copying it back to the original
variable if the textbox needed to be reopened.

Thanks

Lloyd
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Distance transform / 3d nearest neighbor
Next Topic: Status Window

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

Current Time: Fri Oct 10 03:12:18 PDT 2025

Total time taken to generate the page: 0.72111 seconds