Re: sub-widget function creates button widgets with different values each time called [message #40108 is a reply to message #40104] |
Thu, 22 July 2004 09:58   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Michelle Yong writes:
> I created a small function to create a modal or top-level base to pop
> up for user input. The base has a CW_FIELD widget and two buttons
> that say 'ok' and 'cancel'. The first time the big program calls the
> function the two buttons indeed say 'ok' and 'cancel'. The second
> time the function is called in the same session of the big program,
> the CW_FIELD widget has its initial value right, but the two buttons
> say 'button38' or 'button39' or 'button72', etc. and obviously don't
> match up with anything in the CASE statement in the event handler.
> Any tips? I have another widget-creating function that works fine, so
> I can't see what's going wrong, especially since the button values are
> hard-coded into the function. Also, any suggestions for the group
> leader for the modal base (were I to use one)? I arbitrarily picked
> the top-level base of the big interface- does it really matter? I
> switched temporarily to using a top-level base for the pop-up because
> when execution halted for the popup, the whole program doesn't crash
> like with the modal base which refuses to close itself.
Oh, dear. This program sounds scary. It wasn't created
with the GUI Builder, was it?
I can only imagine what is wrong with it, but all the
possibilities boil down to the same "Say, what!?" reaction.
I suspect a programmer misunderstanding. :-)
> Somewhat unrelated, but if you wish to place a simple vertical line
> across an image object, do you have to make the image semi-transparent
> to see the line?
Only if you put the line behind the image. :-)
Check your Z value.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|