Martin Aspeli wrote:
> Daniel Nouri wrote:
>> Wichert Akkerman wrote:
>>> Previously Martin Aspeli wrote:
>>>> Maurits van Rees-3 wrote:
>>>>> Inherit from Plone
>>>>> ------------------
>>>>>
>>>>>     from Products.CMFPlone import utils
>>>>>     class MyView(utils.BrowserView):
>>>>>
>>>>> Acquisition wrapped, same as Five.
>>>>>
>>>>> But in the __init__() of this BrowserView there is the line:
>>>>>
>>>>>     self.context = [context]
>>>>>
>>>>> So you cannot use self.context in your code like you would do in the
>>>>> other cases, but you have to use this:
>>>>>
>>>>>     context = utils.context(self)
>>>>>
>>>>> This is the only thing that is different from the Five BrowserView.
>>>>> All the browser views in CMFPlone/browser use this.
>>>>>
>>>> I really hate this view, and we're not using it any more in new
>>>> views in
>>>> Plone 3. This is because:
>>>>
>>>>  - It makes self.context a list; this breaks compliance with the
>>>> IBrowserView interface
>>>>  - You have to use that silly utils.context() thing
>>>>  - It makes everything have a hard dependency on Products.CMFPlone
>>> That view has been annoying me as well. Perhaps we should just get rid
>>> of it now.
>>
>> +1
>>
>> And maybe we should also not recommend it in the Plone Developer's book.
>>
> 
> Heh. That bit of text is old, man. :)

Hmm, mark obsolete, then?  Some of that text is surely still useful:
http://plone.org/documentation/manual/plone-developer-reference


-- 
http://danielnouri.org


_______________________________________________
Product-Developers mailing list
Product-Developers@lists.plone.org
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to