[Product-Developers] Re: implementing Product interfaces

deesto john.destefano at gmail.com
Wed Jun 18 19:19:49 UTC 2008


Any thoughts on what I've done wrong?
http://deesto.pastebin.com/f2ce2ae07

Again: no errors, but the interface doesn't appear to work.

Thanks,
~John


deesto wrote:
> 
> 
> Hedley Roos wrote:
>> 
>> Hedley Roos wrote:
>>> Your post reminded me of a bit of code I have lying somewhere. Basically 
>>> I wanted to activate a calendar on a particular folder.
>>> 
>>> from p4a.calendar.interfaces import ICalendarConfig
>>> config = ICalendarConfig(folder)
>>> config.calendar_activated = True
>>> folder.reindexObject()
>>> 
>>> IIRC you can then do http://server/folder/@@month.
>>> 
>>> HTH
>>> Hedley
>>> 
>> Sorry for replying to my own post, but as Martin stated the correct 
>> approach is using zcml. My approach requires that you subscribe to your 
>> folserish item's create event and then activate that interface.
>> 
> Understood.  But when I add Martin's class to the folderish
> configure.zcml, there doesn't seem to be any effect.  In fact, I see a
> Sub-types->Calendar drop-down for folders, but my folderish object still
> displays a blank Sub-types menu (with no drop-down items).  Again, no
> errors or feedback when installing the product or adding an object, but I
> have to assume the interface still isn't taking hold.
> http://deesto.pastebin.com/f2ce2ae07
> 

-- 
View this message in context: http://www.nabble.com/-Product-Developers--implementing-Product-interfaces-tp17830937s20094p17989829.html
Sent from the Product Developers mailing list archive at Nabble.com.





More information about the Product-Developers mailing list