Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-06-30 Thread Charlie Clark
Am 13.05.2008 um 23:39 schrieb yuppie: If a new style factory is specified in the FTI a view of that name is looked up on the adding view of the container. This is from plone.app.contentmenu.menu.FactoriesSubMenuItem: addingview = queryMultiAdapter((addContext, self.request), name='+') if a

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-06-22 Thread Charlie Clark
Am 02.05.2008 um 13:50 schrieb yuppie: Did some more refactoring. If your factory can handle all the input, ContentAddFormBase's 'create' method should be sufficient. If not, you need a 'create' method like the one in FileAddView. Done quite a lot of Add Forms based on your work and we en

[Zope-CMF] Re: [dev] newstyle content creation

2008-05-20 Thread Raphael Ritz
Charlie Clark wrote: [..] That's probably the easiest solution at the moment although it would be nice to be able to declare this in the schema. I suppose two different interfaces à la IObject and IMutableObject provide a way. I find fiddling with the form fields too easy to mess up! I thin

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-05-20 Thread Charlie Clark
Am 19.05.2008 um 18:51 schrieb Charlie Clark: That's probably the easiest solution at the moment although it would be nice to be able to declare this in the schema. I suppose two different interfaces à la IObject and IMutableObject provide a way. I find fiddling with the form fields too ea

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-05-19 Thread Charlie Clark
Am 02.05.2008 um 13:50 schrieb yuppie: Did some more refactoring. If your factory can handle all the input, ContentAddFormBase's 'create' method should be sufficient. If not, you need a 'create' method like the one in FileAddView. Yes, thank you very much! You should not use that stuff if

[Zope-CMF] Re: [dev] newstyle content creation

2008-05-13 Thread yuppie
Hi! Laurence Rowe wrote: yuppie wrote: The lookup is pretty much what I do at the moment. I can't think of an easy way of doing this apart from convention which is pretty much what you suggest with "addFile". I suppose the next thing would be to add support for the '+' syntax and addMenuIte

[Zope-CMF] Re: [dev] newstyle content creation

2008-05-10 Thread Laurence Rowe
yuppie wrote: The lookup is pretty much what I do at the moment. I can't think of an easy way of doing this apart from convention which is pretty much what you suggest with "addFile". I suppose the next thing would be to add support for the '+' syntax and addMenuItem directive? The IAdding v

[Zope-CMF] Re: [dev] newstyle content creation

2008-05-02 Thread yuppie
Hi Charlie! Charlie Clark wrote: Am 25.04.2008 um 09:23 schrieb yuppie: I simplified the code in ContentAddFormBase.create and moved it to the add view. 'finishCreate' no longer exists, your add view has to implement the complete 'create' method. Formlib raises an NotImplementedError if 'c

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-28 Thread Charlie Clark
Am 25.04.2008 um 19:23 schrieb Charlie Clark: Agreed. The first five lines are generic and should probably be in ContentAddFormBase leaving just the adapter stuff to be implemented by the view itself which is what is was before! _create would be more in keeping with other formlib methods s

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-25 Thread Charlie Clark
Am 25.04.2008 um 09:23 schrieb yuppie: I simplified the code in ContentAddFormBase.create and moved it to the add view. 'finishCreate' no longer exists, your add view has to implement the complete 'create' method. Formlib raises an NotImplementedError if 'create' is missing. This require

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-25 Thread Charlie Clark
Am 23.04.2008 um 11:27 schrieb Wichert Akkerman: BTW. regarding formlib I've been bashing my head (checkout those bruises!) for weeks on how to add a thumbnail of an existing image to an edit form. Do I need to develop a special widget which will call the appropriate method? Perhaps collecti

[Zope-CMF] Re: [dev] newstyle content creation

2008-04-25 Thread yuppie
Hi! Charlie Clark wrote: Okay. Had a quick look your implementation and I think I understand it! 8-) Had trouble with createAndAdd and finishCreate but now I understand them. Shouldn't there be default finishCreate in the ContentAddFormBase so that it's obvious we have to overwrite it? I si

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Jens Vagelpohl
On Apr 23, 2008, at 17:46 , Charlie Clark wrote: BTW. got bitten by the five.localsitemanager dependency with my 2.10 install. I've just reread the posts on this and I didn't quite understand them. Things worked fine, of course, when I dropped CMFCore/src/five into my lib/python folder but

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Charlie Clark
Am 23.04.2008 um 15:10 schrieb yuppie: No. As I said: That part is still missing. 'folder_factories' provides the old add procedure, the new alternative for 'File' content is available as action in the menu. Would it be a good idea to move this to a menu item like object_actions? Got the

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Charlie Clark
Am 23.04.2008 um 15:10 schrieb yuppie: ah, so clicking on add brings up the tried and trusty page for adding objects to folders? Yes. Only then do we get to the appropriate add_view? No. As I said: That part is still missing. 'folder_factories' provides the old add procedure, the new a

[Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread yuppie
Hi! Charlie Clark wrote: Am 23.04.2008 um 11:12 schrieb yuppie: Charlie Clark wrote: Am 22.04.2008 um 17:24 schrieb yuppie: Yes. Missing is the integration in the CMFDefault add menu. For now the new 'add_file' action is used for showing the link to 'addFile.html'. I hope to have some tim

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Wichert Akkerman
Previously Charlie Clark wrote: > > Am 23.04.2008 um 11:12 schrieb yuppie: > > >Charlie Clark wrote: > >>Am 22.04.2008 um 17:24 schrieb yuppie: > >>>Yes. Missing is the integration in the CMFDefault add menu. For > >>>now the new 'add_file' action is used for showing the link to > >>>'addFile

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Charlie Clark
Am 23.04.2008 um 11:12 schrieb yuppie: Charlie Clark wrote: Am 22.04.2008 um 17:24 schrieb yuppie: Yes. Missing is the integration in the CMFDefault add menu. For now the new 'add_file' action is used for showing the link to 'addFile.html'. I hope to have some time for this (and a new tabl

[Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread yuppie
Charlie Clark wrote: Am 22.04.2008 um 17:24 schrieb yuppie: Yes. Missing is the integration in the CMFDefault add menu. For now the new 'add_file' action is used for showing the link to 'addFile.html'. I hope to have some time for this (and a new table-free version of main_template.pt) on F

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Charlie Clark
Am 22.04.2008 um 17:24 schrieb yuppie: Yes. Missing is the integration in the CMFDefault add menu. For now the new 'add_file' action is used for showing the link to 'addFile.html'. I hope to have some time for this (and a new table-free version of main_template.pt) on Friday. Where exac

Re: [Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread Charlie Clark
Am 22.04.2008 um 23:54 schrieb Martin Aspeli: Have you looked at z3c.form at all? There's a package called plone.z3cform that provides Zope 2 integration for this (it shouldn't be Plone specific beyond that). I'm only asking since people seem to be going in this direction. As Yuppie say

[Zope-CMF] Re: [dev] newstyle content creation

2008-04-23 Thread yuppie
Martin Aspeli wrote: Today I checked in a formlib based add view for File objects[3]. Have you looked at z3c.form at all? There's a package called plone.z3cform that provides Zope 2 integration for this (it shouldn't be Plone specific beyond that). I'm only asking since people seem to be goi

[Zope-CMF] Re: [dev] newstyle content creation

2008-04-22 Thread Martin Aspeli
Hi Yuppie, Implementing newstyle content factories[1] and using events for content creation[2] made it much easier to create content without using invokeFactory and friends. Indeed! These steps are still necessary: - check portal_type exists (*) - check allowType(portal_type) for the conta

[Zope-CMF] Re: [dev] newstyle content creation

2008-04-22 Thread yuppie
Charlie Clark wrote: Am 22.04.2008 um 14:27 schrieb yuppie: Today I checked in a formlib based add view for File objects[3]. There is a new "Add File" action available if you use the "Experimental CMFDefault Browser Views" extension profile. Any feedback is welcome. Not sure if this makes Bug