avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: ID attribute in Fortress config
Date Mon, 10 Mar 2003 17:14:14 GMT
Vincent Tencé wrote:
> Committed wrong version of GuiApp.xconf. Attached is correct one, which adds
> the id attribute to menu bar component configuration. What's the purpose of
> the id attribute BTW?


I caught that myself.

The ID attribute is used for two things:

The name assigned to instrumentables (if the component is
instrumentable), and the name assigned to selected components
if you access them like this:

ServiceSelector selector =
     (ServiceSelector)m_manager.lookup(Screen.ROLE + "Selector");
Screen instance = (Screen) selector.select( "about" );


or if you access it like this:

Screen instance = (Screen) m_manager.lookup(Screen.ROLE + "/about");

So it is a lookup key for components that have multiple implementations
in the system (but distinct responsibilities), and it is a debug
constant that each component can use in log messages/instrument
names, etc.





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message