Hi Arwa, Manager extends NamedObj. Managers are usually put into a CompositeEntity. See ptolemy.kernel.CompositeEntity for various methods that will tell you what is in a CompositeEntity.
See http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/codeDoc/ptolemy/kernel/CompositeEntity.html To find all the instances of class Foo, below is some code that *might* work NamedObj container = manager.getContainer(); if (container instanceof CompositeEntity) { List entities = ((CompositeEntity) container).entityList(Foo.class); // Then iterate through the entities . . . } You could probably avoid the instanceof check. See the kernel chapter of the design doc for information about how to access entities. http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-29.html _Christopher On 9/7/10 9:00 AM, Jamnagarwala, Arwa Mohmadi wrote: > Hi all, > > I am trying to get a handle to a specific actor of a container in the > ptolemy.actor.Manager class, but I'm unable to do so. Can someone please let > me know how to possibly do this? > > Thanks, > > Arwa > _______________________________________________ > Kepler-users mailing list > Kepler-users at kepler-project.org > http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users -- Christopher Brooks, PMP University of California CHESS Executive Director US Mail: 337 Cory Hall Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774 ph: 510.643.9841 fax:510.642.2718 (Office: 545Q Cory) home: (F-Tu) 707.665.0131 cell: 707.332.0670