[Zope3-Users] Contained File object
Tom Dossis
td at yoma.com.au
Tue Jan 18 13:01:10 EST 2005
Dominik Huber wrote:
> The container framework does not require mandatory ILocation or
> IContained for its containment. In absent of ILocation or IContained a
> contained proxy is used (comparable to zope 2's context wrappers) to
> provided
> IContained. (See ../src/zope/app/container/contained.py -> function
> containedEvent())
>
That's it - thank you.
I seem to be getting caught out by the 'fine print' trying to create
objects. I presumed zapi.createObject and zapi.add would take care of
the details, but I don't think this is the case (yet)? Currently I
follow a quite explicit recipe along the lines...
createObject:
ob = factory(..)
notify(ObjectCreatedEvent(..))
return ob
add:
chooseAndCheckName(name, ob, container)
checkConstraintsFor(ob, container, name)
container[name] = ob
return container[name] # or return ob if IContained
More information about the Zope3-users
mailing list