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

Home » Public Forums » archive » event_pro for compound widgets
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: EVENT_PRO [message #73771 is a reply to message #40935] Mon, 29 November 2010 11:02 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> Or maybe "MotionControl::SaveData" and "MotionControl::OpenData" ?
>
> Can objects be used this way in widget programming? If not, does the Catalyst library do all the necessary heavy lifting?
>
> I'm at the tipping point of wanting to learn something new in IDL widget-y stuff now that I'm IDL-OO-enthused. Using IDL
> objects has made my code design a lot easier to understand (despite the necessary increase in actual LOC) and if there's
> one thing my IDL widget programs can greatly benefit from, it's better design!

Well, I can't even remember the details of how
Catalyst does this, so yes, I presume it does
all the necessary heavy lifting. It does just
seem to work. :-)

All widget events in the Catalyst Library (where all
widgets are objects) go to a single "event dispatcher".
(You can find this in the Utilities directory.) The
event dispatcher's job is to determine where the event
should be sent. Each widget has a container with
"event objects" stored there. The event dispatcher
essentially collects the event objects and calls the
EventHandler method on these event objects.

This means that in a Catalyst application a single
"event" might be sent to several different "event
handlers", rather than to a single event handler,
as happens in a strict widget program.

In Catalyst you assign an "event handler" to a widget
with the EVENT_OBJECT keyword. There is an optional
EVENT_METHOD keyword that can be used select the actual event
method for this event object. Otherwise, the event
is always sent to the EventHandler method of the
event object.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EVENT_PRO
Next Topic: Notable Coyote Program Updates

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

Current Time: Wed Oct 08 18:21:51 PDT 2025

Total time taken to generate the page: 0.00610 seconds