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 #87324 is a reply to message #87321] Fri, 24 January 2014 11:56 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
>> IDL> if (max(theHash[message] eq obj1) eq 0) then theHash['CHANGED_COLORS'] -> add, obj1

> I don't really understand this code and the way you use
> the Max function.


theHash[message] is the list of objects receiving/sending messages. Lists have _overloadEQ methods that compare each entity in the list to the desired quantity. If the maximum in the array of 1's and 0's is 0, then you know that the object is not in the list already.

IDL> message = 'CHANGED_COLORS'
IDL>
IDL> theHash = hash()
IDL> obj1 = obj_new('idl_container')
IDL> obj2 = obj_new('idlanroi')
IDL> obj3 = obj_new('idlgrview')
IDL>
IDL> theHash[message] = list()
IDL> theHash[message] -> add, obj1
IDL> theHash[message] -> add, obj2
IDL> print, theHash[message] eq obj3
0 0
[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 08:03:37 PDT 2025

Total time taken to generate the page: 1.52181 seconds