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

Home » Public Forums » archive » Xmanager R US
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
Xmanager R US [message #26823] Tue, 25 September 2001 14:20
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I know they told us not to do this, but...
Anyone who looked into Xmanager saw that it uses event directing loops.
It tracks managed widgets using common blocks. However, WIDGET_CONTROL
must have an internal reference to WIDGET_EVENT, because the following
snippet works in a fresh IDL session, with no Xmanager common blocks established:

;*******************
pro tlb_event, ev
help, ev, /str
end
;*******************
function b_func, ev
help, ev, /str
ev = create_struct(ev, 'my_field', 'My_value')
return, ev
end
;*******************
pro junk, tlb
tlb = widget_base(event_pro='tlb_event')
but = widget_button(tlb, value='press', event_func='b_func')
widget_control, tlb, /realize, /managed
end
;*******************

Anybody knows why and how does the above work?
This makes me wonder, why do we need Xmanager with its loops?
Besides, the online help says that an Event_pro or Event_func are called
by Widget_event using widget's ID as an argument. As far as I could see,
the widget's event structure is passed as an argument instead. Oh well.
A typo, I guess.
Cheers,
Pavel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Text Widget Confession
Next Topic: Re: disappearing text - online help widget

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

Current Time: Wed Oct 08 17:18:25 PDT 2025

Total time taken to generate the page: 0.00554 seconds