[kepler-dev] How To Get a Reference to the Configuration?

Matthew Brooke brooke at nceas.ucsb.edu
Fri Nov 18 12:09:41 PST 2005


I sent to the ptolemy-hackers list this morning. Copying to kepler-dev, 
in case anyone here can offer any insight?

-----------

I'm working on the Kepler project (www.kepler-project.org), and am
having trouble getting at the configuration object from other parts of
the application. Is there an "standard" ptii way to do this, without
explicitly passing references?

I'm interested in reading settings from the configuration.xml file, but
it seems like I can get a reference only from a TableauFrame or from the
MoMLApplication/VergilApplication classes. If I don't have a reference
to any of those classes, how do I get the config?

One workaround would be to read the config myself each time, by creating
my own MoMLParser, but this seems unnecessarily expensive, and still has
the problem that the parser needs the URL for the config file, which
also doesn't seem to be available globally.

Any help from anyone would be greatly appreciated

Thanks!

Matthew


-- 

---------------------------------------------
Matthew Brooke, Ph.D.
Marine Sciences Research Building, Room #3407
University of California
Santa Barbara, CA  93106-6150
ph: (805) 893-7108   fx: 805-893-8062
brooke at nceas.ucsb.edu
---------------------------------------------




More information about the Kepler-dev mailing list