[Zope3-Users] Add menu item creation

2005-07-26 Thread Dmitry Vasiliev

Hi!

Is this a way to create the add menu item without the separate addMenuItem 
directive? For example if I write:


addform
...
menu=zope.app.container.add title=Title
/

I've got the following error:

ConfigurationError: ('Invalid value for', 'menu', 'ImportError: Module 
zope.app.container has no global add')


Maybe the menu id should be changed?

--
Dmitry Vasiliev (dima at hlabs.spb.ru)
http://hlabs.spb.ru
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Add menu item creation

2005-07-26 Thread Dmitry Vasiliev

[EMAIL PROTECTED] wrote:

From: Dmitry Vasiliev [EMAIL PROTECTED]
Date: Tue, 26 Jul 2005 11:14:35 +0400
To: zope3-users@zope.org
Subject: [Zope3-Users] Add menu item creation


Hi!

Is this a way to create the add menu item without the separate addMenuItem 
directive? For example if I write:


addform
 ...
 menu=zope.app.container.add title=Title
 /

I've got the following error:

ConfigurationError: ('Invalid value for', 'menu', 'ImportError: Module 
zope.app.container has no global add')


Maybe the menu id should be changed?


Hi Dmitry,

Your analyse was correct: the menu-id may be incorrect. The menu-id has to
be declared in ZCML before it's use in ZCML. Like:

menu
  id=zmi_views
  title=Menu for displaying alternate representations of an object /

In this case zmi_views is the menu-id to be used.


So the question is: Should the menu id 'zope.app.container.add' be changed to 
something like 'container_add' in zope/app/menus.zcml?


--
Dmitry Vasiliev (dima at hlabs.spb.ru)
http://hlabs.spb.ru
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with PartialAnnotationsAdapter

2005-07-26 Thread Fred Drake
On 7/26/05, Florian Lindner [EMAIL PROTECTED] wrote:
 Mmmhh, I'm wondering why it used to work about 2 weeks ago...

Good question; I'd have been surprised if they did.

 Why are these
 class declarations necessary? Everything is file-based code, so AFAIK there
 should not be a problem with permissions.

Nothing is trusted unless you say it is as far as I can tell.  The
source of the code only hints as to it's trustworthiness in practice;
policy is defined by the checkers.

 Anyways, I am not able to make it work with that. It's still the same
 traceback:
 
   File /home/florian/Zope3/src/zope/app/container/browser/contents.py, line
 169, in _extractContentInfo
 info['retitleable'] = canWrite(dc, 'title')
   File /home/florian/Zope3/src/zope/security/checker.py, line 96, in
 canWrite
 checker.check_setattr(obj, name)
 
 I've also tried to change the zope.ManageContent to zope.Public, but does
 change nothing.

Hard to debug from here still.


  -Fred

-- 
Fred L. Drake, Jr.fdrake at gmail.com
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users