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: class MyObject(object): ... And a factory defined in ZCML: <class class=".MyObject"> <factory id="me.MyObject" description="Create a new MyObject" /> </class> 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 Zope 3. Thanks! -- Ron _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users