Nicola Ken Barozzi wrote:
> Peter Royal wrote:
>>> Aren't ComponentManagers(nowLocators) doing a similar thing (ie giving a
>>> class based on a name-role)?
>>
>>
>>
>> Not exactly. For some examples, in Phoenix a block is actually passed 
>> an instance of a BlockContext, from which a block can determine base 
>> directory that the block is running in as well as its configured name. 
>> It is my understanding that the Context was designed for the passage 
>> of runtime information from the container to components.
> 
> 
> In reality, it can be used to do anything.
> 
> It's too generic to be made to enforce anything;
> if a Container wants to tell something to its child,
> why not simply call a child's method, instead of giving the child
> a handle, which really makes the child a container itself.

This would create a requirement for the container to be aware of the 
component method to handle a particular value.  It also eliminates the 
hirachical retrival process of a context (which is so nice to use).

You can enforce context management if you introduce meta-info on a 
compoennt type that declares the context contract.

Steve.


-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:[EMAIL PROTECTED]
http://www.osm.net


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to