| Re: Where O Where Di My Pointer Go? [message #61416 is a reply to message #61415] |
Tue, 15 July 2008 12:32  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
phillipbitzer@gmail.com writes:
> I've battling with this for a week now, and I think it needs a fresh
> pair of eyes. I am working on code that pops up a Modal Widget, does
> some manipulation, and pass some information back to the user. For
> reference, I am using D Fanning's general approach to this problem.
I think you are going to have to look at textbox.pro just
a little more carefully. :-)
> filter_dialog_info = {filter_times:PTR_NEW(times), $
> filter_data:PTR_NEW(data), $
> filter_data1:PTR_NEW(data), $
> filter_data2:PTR_NEW(data), $
> filter_data3:PTR_NEW(data)}
>
> WIDGET_CONTROL, tlb, SET_UVALUE=filter_dialog_info, /No_copy
Your pointers are in a structure that you store in the UVALUE
of your TLB. This structure is completely and utterly destroyed
by the time you get to the other side of your XMANAGER call.
And, while the pointers are there, you have no way to get to
them now.
Make your pointers outside this structure, *then* put them
in the structure. That way, you will have access to them
when you need them.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|