Re: [Zope3-Users] Conflicting configuration actions for protectName __setitem__

2006-09-20 Thread Rob Campbell

Hi Darryl,

That is how I had the IFosterRecord interface before, and I got a lot 
more errors than just __setitem__.  I am only getting the __setitem__ 
error now, after changing it to something like:


class IFosterRecord(Interface):

  contains('.IFosterSource')

  title = TextLine(...)

and the implementation is:

class FosterRecord(BTreeContainer):

  implements(IFosterRecord)

  title = FieldProperty(IFosterRecord['title'])

I think the problem is coming from contains().  Do I need to create 
another interface just for the contains()?  Maybe something like 
IFosterSourceContainer.  Or is there another way to fix this error? 
Thank you for the reply.


--
Rob Campbell

Darryl Cousins wrote:

Hi Rob,

__setitem__ is likely also part of your IFosterRecord interface.

class IFosterRecord(IContainer)   #?

and this is causing the conflict.

Regards,
Darryl

On Tue, 2006-09-19 at 15:35 -0700, Rob Campbell wrote:
I know I read about this error somewhere before, but I haven't been able 
to find anything through Google searches.  I have a container that also 
has it's own attributes.  I am calling 
zope.app.container.constraints.contains from IFosterRecord, is that what 
is causing the __setitem__ problem?


Here is the traceback I have been getting:

zope.configuration.config.ConfigurationConflictError: Conflicting 
configuration

actions
   For: ('protectName', class 'rats.foster.FosterRecord', '__setitem__')
 File /opt/zope/instance/lib/python/rats/configure.zcml, line 
25.2-45.2

 class class='.foster.FosterRecord'
   implements
 
interface='zope.app.container.interfaces.IContainerNamesContainer'

   /
   require
 permission='zope.View'
 interface='zope.app.container.interfaces.IReadContainer'
   /
   require
 permission='zope.ManageContent'
 interface='zope.app.container.interfaces.IWriteContainer'
   /
   require
 permission='zope.View'
 interface='.interfaces.IFosterRecord'
   /
   require
 permission='zope.ManageContent'
 set_schema='.interfaces.IFosterRecord'
   /
 /class



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Conflicting configuration actions for protectName __setitem__

2006-09-19 Thread Darryl Cousins
Hi Rob,

__setitem__ is likely also part of your IFosterRecord interface.

class IFosterRecord(IContainer)   #?

and this is causing the conflict.

Regards,
Darryl

On Tue, 2006-09-19 at 15:35 -0700, Rob Campbell wrote:
 I know I read about this error somewhere before, but I haven't been able 
 to find anything through Google searches.  I have a container that also 
 has it's own attributes.  I am calling 
 zope.app.container.constraints.contains from IFosterRecord, is that what 
 is causing the __setitem__ problem?
 
 Here is the traceback I have been getting:
 
 zope.configuration.config.ConfigurationConflictError: Conflicting 
 configuration
 actions
For: ('protectName', class 'rats.foster.FosterRecord', '__setitem__')
  File /opt/zope/instance/lib/python/rats/configure.zcml, line 
 25.2-45.2
  class class='.foster.FosterRecord'
implements
  
 interface='zope.app.container.interfaces.IContainerNamesContainer'
/
require
  permission='zope.View'
  interface='zope.app.container.interfaces.IReadContainer'
/
require
  permission='zope.ManageContent'
  interface='zope.app.container.interfaces.IWriteContainer'
/
require
  permission='zope.View'
  interface='.interfaces.IFosterRecord'
/
require
  permission='zope.ManageContent'
  set_schema='.interfaces.IFosterRecord'
/
  /class
 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users