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

Home » Public Forums » archive » Re: Modal widgets and Sending Events
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Modal widgets and Sending Events [message #21349 is a reply to message #21347] Sat, 19 August 2000 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (pemaquidriver@tidewater.net) writes:

> I have a widget application (call it MYWIDGET) from which I send events
> to other widgets in the calling routine (via Widget_Control, ExternalID,
> Send_Event = {EVENTSTRUCTURE}). The procedure is modeled after David's
> xCOLORS procedure.
>
> I have noticed that when the TLB of MYWIDGET has the MODAL keyword set
> to 1, the events are accumulated until I exit MYWIDGET. After exiting,
> these events all come bubbling through to the event handler specified by
> ExternalID. However, if the MODAL keyword is set to 0, the events are
> sent to the handler as they are generated by the user's actions in
> MYWIDGET.

This is exactly what it means to be a modal widget.
Only events in the modal widget are acted upon. All
events in all other widget programs are blocked,
including the events you send from the modal widget
to those other programs. This proves, by the way, that
an event sent via SEND_EVENT is treated exactly as
any other widget event.

> Even though I can control the behavior (so the application does what I
> want it to), this experience exposes one of my numerous widget
> weaknesses: to me, XMANAGER is a black box shrouded by a dense fog in
> the late hours of the night. So here's the question, how does XMANAGER
> know an event is internal to the MYWIDGET application as opposed to the
> faked events that I send to a widget created outside the widget
> application?

I don't think this is really any great secret.
XManager knows that an event is internal to a program
if the widget that generates the event (event.id) is in the
widget hierarchy of the top-level base of that program.
(And, of course, you registered the TLB when you called XManager.)
How else would XManager know that you mean *this* XColors
program and not *that* XColors program over there?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: CONSUMER ALERT - Beware of Eucalypt Software - Makers of Autopost & Rocketfuel!!!
Next Topic: object newbie

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

Current Time: Sat Oct 11 03:00:01 PDT 2025

Total time taken to generate the page: 3.68031 seconds