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
Re: Need IDL 8 Help [message #87316 is a reply to message #87311] Thu, 23 January 2014 18:09 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
I would do something like the following: Create a hash whose keys represent the message that is to be sent/received. The value of the key is a list that will contain each of the objects corresponding to that message. You can then check if an object is already in the list.

IDL> theHash = hash()
IDL> obj1 = obj_new('idl_container')
IDL> obj2 = obj_new('idlanroi')
IDL> message = 'CHANGED_COLORS'
IDL>
IDL> theHash[message] = List()
IDL> if (max(theHash[message] eq obj1) eq 0) then theHash['CHANGED_COLORS'] -> add, obj1
IDL> print, theHash[message]
<ObjHeapVar21665(IDL_CONTAINER)>
IDL>
IDL>
IDL> if (max(theHash[message] eq obj1) eq 0) then theHash['CHANGED_COLORS'] -> add, obj1
IDL> print, theHash[message]
<ObjHeapVar21665(IDL_CONTAINER)>
IDL>
IDL> if (max(theHash[message] eq obj2) eq 0) then theHash['CHANGED_COLORS'] -> add, obj2
[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: Sat Oct 11 01:42:50 PDT 2025

Total time taken to generate the page: 0.72017 seconds