[Zope] initlevel at initialization of product with aq_parent

Jens Vagelpohl jens@zope.com
Fri, 19 Jul 2002 15:23:31 -0400


the signature is::

def manage_afterAdd(self, item, container):
    """ do my thang """
    ...

self is self
item is normally self as well
container is this item's container.

jens


On Friday, July 19, 2002, at 10:44 , Nico de Boer wrote:

>
> Hi,
>
> Sounds fine to me, use manage_afterAdd. But how do I do this?
>
> I think about the following:
>
> def __init__(self, id, title='', initlevel= 0):
> 		"""initialise a new instance of SiteNav"""
> 		self.id = id
> 		self.title = title
> 		self.initlevel = initlevel
>
> def manage_afterAdd(self):
>         self.initlevel = self.getInitlevel()
>         return self.initlevel
>
> Or something like that, because I don't have an idea how this method
> manage_afterAdd works.
>
> Greetz Nico