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

Home » Public Forums » archive » Re: Lost my 'info' structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Lost my 'info' structure [message #31193] Wed, 19 June 2002 15:05
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Reno Choi (K.Y.Choi@soton.ac.uk) writes:

> I have a widget program that contains child widget function, i.e. as a
> button pressed, new widget pops up for changing properties of a plot
> in parent widget, for instance. Part of the code in event handler is
> as follows,
>
> ...
> 414 WIDGET_CONTROL, event.top, GET_UVALUE=info, /NO_COPY
> 415 get = child(cancel=Canceled, GROUP_LEADER=event.top)
> 416 WIDGET_CONTROL, event.top, SET_UVALUE=info, /NO_COPY
> ...
>
> The XMANAGER error occurs.
>
> % XMANAGER: Caught unexpected error from client application. Message
> follows...
> % Expression must be a structure in this context: INFO.
> % Execution halted at: CHILD 167 A:\child.pro
> % XMANAGER_EVLOOP_STANDARD 478
> C:\_Work\ENVI35\IDL55\lib\xmanager.pro
> % XMANAGER 708
> C:\_Work\ENVI35\IDL55\lib\xmanager.pro
> % PARENT_EVENT 197 D:\parent.pro
> % PARENT 415 A:\parent.pro
> % $MAIN$
> INFO UNDEFINED = <Undefined>
> % Expression must be a structure in this context: INFO.
> % Execution halted at: PARENT 418 A:\parent.pro
> % WIDGET_PROCESS_EVENTS
> % $MAIN$
>
> The error massage obviously indicate that it stops at XMANAGER in
> child program, and lost INFO structure from parent program. I couldn't
> find how to keep my INFO structure. The conflict of XMANAGER between
> parent and child may seem to cause the problem.

I'm guessing a bit here, because you have only provided a bit
of code. But it seems to me the CHILD program is doing something
with a variable "info" that isn't defined. Since you didn't pass
*this* info structure into CHILD, I presume you have not defined
another info structure in the CHILD program. That is the one that
is causing you the problem.

However, if you *do* pass this info structure into the CHILD
program, you are likely to have other problems. One solution
would be to put the info structure in into a pointer, then
pass that pointer around to all the programs (e.g. CHILD)
that needs the information.

> Since I am not quite familiar to use XMANAGER, is there a special
> keyword for solve the problem?

No. This is a programming problem, not an XMANAGER problem.

> More strange thing is that the same code works in my home PC, whereas
> it doen't in my office PC (Same version of IDL). Could such problem be
> affected by hardware?

No. :-)

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
[Message index]
 
Read Message
Previous Topic: Image registration using Powell optimization
Next Topic: Format codes in IDL

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

Current Time: Sun Oct 12 05:48:40 PDT 2025

Total time taken to generate the page: 0.79982 seconds