On 7/2/09 4:12 PM, Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Malthe Borch wrote:
>> 2009/7/2 Tim Hoffman<t...@zute.net>:
>>> I think you woul lose that capability with just name based registrations.
>> Yes, but perhaps for the better; it was always problematic to use
>> component adaptation to create specialized views based on the iro,
>> because of the order of adaptation, e.g. with viewlets:
>>
>>    context, request, view, manager
>>
>> You will easily run into situations where you need to do a lot of
>> seeming superflouous component registrations because you've
>> specialized on ``context``, say.
>>
>> I think there is a better scheme out there which does not rely in this
>> way on multi-adaptation.
>
> The fact that multi-adaptation can be hard doesn't mean it can't also be
> useful:  I don't see *any* way to achieve Tim's goals without something
> like an IRO.

You can either:

- unwind the "IRO" and attach all the "interfaces" to the context object
   directly.

- use a class as the context that has the specialized interface, but
   subclasses something that uses the default interface.

There's nothing particularly magical about IRO except convenience.

- C
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to