On Mon May 22 2006 20:11, Tom Dossis wrote:
> > Ok. So now I'm wondering... what's the point in using createObject if I
> > can just create an object the Python way?
> I guess createObject could be useful in an example such as a generic
> add-objects menu. In this scenario it's probably be easier to deal with
> factory names.
> Otherwise I can't see why you shouldn't do it the python way if it's
> more direct/explicit.
So is it true then, if I have a class:
And a factory defined in ZCML:
description="Create a new MyObject"
MyObject() and createObject("me.MyObject") will do the same thing and create
the same object?
If I recall from Zope 2 development, you couldn't just do the former, but
it's been awhile and I remember just enough to taint my mind when working in
Zope3-users mailing list