Idl pointers/widget events [message #12503] |
Thu, 13 August 1998 00:00  |
dhamilton
Messages: 1 Registered: August 1998
|
Junior Member |
|
|
I am having a pointer problem. I use a pointer to maintain information from a
widget event handler (as per David Fanning). However, despite the fact that
the "info" structure which contains the pointer is passed successfully into the
container with "set_uvalue", the pointer itself becomes invalid. Is there some
problem with IDL for VMS or am I just doing something wrong?
ptr = ptr_new({thing:thing, junk:junk})
info = {stuff:stuff, ptr:ptr}
widget_control, tlb, set_uvalue=info, /no_copy
xmanager, "config", tlb, /no_block
...
(now, in my event_handler "config_event":)
widget_control, event.top, get_uvalue=info, /no_copy
(at this point, "info" is a completely valid structure, and I can examine
"info.stuff" to my heart's content. However, an attempt to reference
"(*info.ptr)" results in crashing my program and an invalid pointer message.)
I have also noticed some inconsistency with this problem between regular IDL
and IDL/DE, which seems impossible. However, sometimes my code works in the
development environment, but not in the regular command line. ?
Thanks for your time and help
Damian Hamilton, SLAC
|
|
|