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

Home » Public Forums » archive » Widgets: group leader and procedures
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Widgets: group leader and procedures [message #37542] Sat, 03 January 2004 22:33
Karthik is currently offline  Karthik
Messages: 10
Registered: December 2003
Junior Member
Hello All,

I have a main programme with a widget base and it includes a widget
button called "Alalyse Data" - when the user clicks on it I would like
to execute the bit of code called "alalyse_simset_data", so the thing
looks like this (not exactly the same but the code below is illustrative)

;-----------------------------------------
Pro main_programme
tlb = widget_base()
analyse = widget_button(row5, value = 'Analyse Data', $
Event_PRO= 'analyse_simset_data')
<etc>
widget_control, tlb, /realize

state={ bunch of stuff}
pstate = Ptr_new(state, /no_copy)
widget_control, tlb, set_uvalue = pstate
xmanager, 'make_random_activity', tlb
END
;-----------------------------------------


Now I would like, for clarity, the analyse_simset_data bit of code to be
a completely independent file and I would like that to contain a widget
as well.

;-----------------------------------------
PRO analyse_simset_data, event
widget_control, event.top, get_uvalue = pstate

base2=widget_base( ?????????? )
END
;-----------------------------------------


The ????? marks refer to my doubts on the subject: how do you pass on
the group leader information in the state pointer so that killing the
main widget from main_programme kills the widget created in
analyse_simset_data as well? Is the group leader information a string?
Are there any rules I should follow when a procedure invoked my a main
programme creates a widget? Any advice/suggestion would be greatly
appreciated.

Thanks,

Karthik.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Why does IDL get this wrong?
Next Topic: XROI & Regions_out question

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

Current Time: Wed Oct 08 17:11:10 PDT 2025

Total time taken to generate the page: 0.00525 seconds