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

Home » Public Forums » archive » Re: Event generation by object.
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 generation by object. [message #17681 is a reply to message #17678] Wed, 10 November 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Erik (ehummel@best.ms.philips.com) writes:

> Suppose an objectData which contains some data. Another objectOther is
> interested in this objectData.
> I like to have the following situation:
> The data of objectData is modified. This objectData generates an event
> on this modification. The event
> can be received by objectOther if this objectOther has subscribed on
> notifications of objectData.
> Both these objects don't have widgets.
> Question: is there an event mechanism in IDL which makes this possible?

If by "subscribed" you mean it was given an object reference
and the name of a method to call, then yes, you can do
it like this, where "newdata" is any arbitrary parameter
or parameters accepted by the method:

IF Obj_Valid(objReference) THEN $
Call_Method, objReference, objMethod, newdata

For some reason I can't find Call_Method in the
documentation (at least by going through the Index
of the On-Line help), but I know it is there and
that it works because I use it a lot. :-)

Cheers,

David

P.S. See the NotifyObj keyword in my XCOLORS program if
you want an example of how an object "subscribes" for
notification.

--
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
Previous Topic: Printing a widget_draw window
Next Topic: Re: New Drawing Color Object

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

Current Time: Sat Oct 11 03:37:21 PDT 2025

Total time taken to generate the page: 0.87944 seconds