Re: getting size of zope.schema.List from a view in bluebream

Joshua Immanuel <[email protected]>
Newsgroups gmane.comp.web.zope.bluebream,gmane.comp.web.zope.devel
Organization HiPro IT Solutions Private Limited
Message-ID <1314099254.2450.80.camel@jimman>
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[offset:limit]
        
I get the following error

        ForbiddenAttribute: ('__getslice__',[...])
        
I guess my approach is flawed. Implementing all the functionality (like
the one I did for length) that a list provides is a overkill. So, please
guide me in this regard.

Thanks
-- 
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEUEABECAAYFAk5TkDYACgkQWw85XwuSFML1GACeNqryb2q2+hiWNioOmhGB2LSd
9EwAlR/4p0Asagqu1clDoBZJ5jp/g8w=
=5+ak
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.