Modal dialog - returning values [message #43172] |
Mon, 21 March 2005 00:54 |
david.anthony.roberts
Messages: 1 Registered: March 2005
|
Junior Member |
|
|
Have read lots of solutions to this problem but none seem to apply? Im
new so forgive me.
Here is my code
pro Create_Images, Event
Image_Create,GROUP_LEADER=Event.top
end
(Image_Create brings up a modal dialog box that was created using the
automatic IDL gui generation i.e. I put the buttons on and it wrote the
Image_Create.pro and Image_Create_eventcb.pro for me)
Ive read I can store a pointer in the top level but have already got
something stored there - the code below shows what I put there
imagestore=CREATE_STRUCT(imagestore,'invertedsmallarray',inv ertedsmallarray)
wDraw=WIDGET_INFO(Event.top,FIND_BY_UNAME='Draw')
WIDGET_CONTROL,wDraw,SET_UVALUE=imagestore
Therefore if I put a pointer in the top level base will I loose
imagestore?
I have a modal dialog box that just returns a float so i used a COMMOM
block (but believe this is not advisable). I cant do this now beacuse
I want to return an array (structure) generated in the modal dialog.
Also should I be storing stuff as above - it was the only way I found I
could pass information around my gui program (i.e. between procedures)
Thanks in advance
Dave Roberts
Physicist
Royal Free Hospital
London
|
|
|