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

Home » Public Forums » archive » Need IDL 8 Help
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Need IDL 8 Help [message #87311] Thu, 23 January 2014 15:57 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

In an on-going effort to learn more about IDL 8, I've plunged into
object graphics, etc. At the moment I am implementing an object
messaging system for communication between objects. In the past, I
implemented this by creating my own "list" object. I've decided to give
this a go with lists and hashes, which seem suitable for this purpose.
But, in writing the code, things are getting WAY too complicated,
leading me to think I don't understand this very well. I thought lists
and hashes were suppose to make code more elegant, not more complex.

So, I'm doing something wrong.

Here is the idea. Each object has a container for "message recipients".
When you are interested in getting some communication from an object,
you register your interest with the object by asking the object to
include you in the message recipient "list" (whatever that is). When you
register, you tell it what message you are interested in (a string like
CHANGED_COLORS, or IMAGE_ZOOMED) and you tell who you are (an object
reference).

When a message is generated, the object looks in its message recipient
"list" to see who has registered an interest in a particular "message",
and sends the message to that object.

So, here is the problem. I want to store (together) messages and their
recipients. I need to make sure I don't store duplicates (same message
and recipient in the list). I need to retrieve those recipients that are
associated with a particular "message". For example, give me a list of
all the recipients who are interested in the message "CHANGED_COLORS" or
the message "ANY".

How would you implement these requirement using some of the new features
in IDL 8?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TODO tag in IDL Workbench?
Next Topic: Unable to create X windows Window is iconified and has no backing store...

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

Current Time: Fri Oct 10 10:58:57 PDT 2025

Total time taken to generate the page: 0.72311 seconds