[Zope-dev] zope-tests - FAILED: 32, OK: 29, UNKNOWN: 3

2011-08-23 Thread Zope tests summarizer
This is the summary for test reports received on the zope-tests list between 2011-08-22 00:00:00 UTC and 2011-08-23 00:00:00 UTC: See the footnotes for test reports of unsuccessful builds. An up-to date view of the builders is also available in our buildbot documentation: http://docs.zope.org/

Re: [Zope-dev] [BlueBream] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Joshua Immanuel
Hello Adam, On Tue, 2011-08-23 at 15:13 +0200, Adam GROSZER wrote: > > > > > Should do it. (but beware I did not test!) > > That is in zope.app.security/_protections.zcml > > Might be that you'd need to include that package. Yes. Including that file in zcml solved the issue.

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Joshua Immanuel
Hello Adam, Thanks for the reply. On Tue, 2011-08-23 at 14:39 +0200, Adam GROSZER wrote: > Well using removeSecurityProxy is not so nice. > > If there's really a list in your property, then zope should give you > zope.Public access: > > _default_checkers = { > ... > list: NamesChecker(['_

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Adam GROSZER
Hello, Well using removeSecurityProxy is not so nice. If there's really a list in your property, then zope should give you zope.Public access: _default_checkers = { ... list: NamesChecker(['__getitem__', '__getslice__', '__len__', '__iter__', '__contains__', 'inde

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Joshua Immanuel
Hello Charlie, Thanks for the reply. On Tue, 2011-08-23 at 13:56 +0200, Charlie Clark wrote: > I think it's really difficult to work out what you are trying to do. > Please state your problem more clearly. Are you still using zope.form > or are you using z3c.form? I am still using zope.formli

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Charlie Clark
Am 23.08.2011, 13:34 Uhr, schrieb Joshua Immanuel : > This solves just the '__len__' issue. But if do the slice operation like > this >self.context.list_field[offset:limit] > I get the following error >ForbiddenAttribute: ('__getslice__',[...]) > I guess my approach is flawed. Impl

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Joshua Immanuel
Hello all, On Tue, 2011-08-23 at 13:16 +0530, Joshua Immanuel wrote: > def getListSize(self): > return len(self.list_field) > > This solves my issue. This solves just the '__len__' issue. But if do the slice operation like this self.context.list_field

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Joshua Immanuel
Hello Adam, On Tue, 2011-08-23 at 11:29 +0200, Adam GROSZER wrote: > You forgot to paste interfaces.IMyObject definition. Sorry. Here is my interface definition. class IMyObject(Interface): name = TextLine( title=u'Name') list_fi

Re: [Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Adam GROSZER
Hello, You forgot to paste interfaces.IMyObject definition. On Tue, 23 Aug 2011 13:16:24 +0530 you wrote: > > Hello all, > While trying to get the length of zope.schema.List field in a view > (like this: len(self.context.list_field) I get the following error > > ForbiddenAttribute:

[Zope-dev] getting size of zope.schema.List from a view in bluebream

2011-08-23 Thread Joshua Immanuel
Hello all, While trying to get the length of zope.schema.List field in a view (like this: len(self.context.list_field) I get the following error ForbiddenAttribute: ('__len__', []) Even though my zcml configuration for that class is defined as below I s