Re: [Zope3-Users] Re: How to test for object metatype

2005-04-18 Thread Cliff Ford
Thank you: I now have all the filtering code in the browser view class and am using providedBy rather than isinstance. The update method forbiddenAttribute problem got sorted using setattr(...) instead of attribute=... Cliff Philipp von Weitershausen wrote: Cliff Ford wrote: Thanks for the help

[Zope3-Users] Re: How to test for object metatype

2005-04-18 Thread Philipp von Weitershausen
Cliff Ford wrote: I begin to see the light: with an update method in a class supporting the view I was getting a forbidden attribute error. I am not sure how to deal with that so I have left the update method in the content class but put all code to do with the edit form in the view class. Not q

[Zope3-Users] Re: How to test for object metatype

2005-04-18 Thread Philipp von Weitershausen
Cliff Ford wrote: Thanks for the help. I 'discovered' the isinstance method in the ZAPI Reference of your book, which is just what I needed. Note that with isinstance, you check for a certain implementation, not for functionality. In general, that is not preferrable because implementations may c

Re: [Zope3-Users] Re: How to test for object metatype

2005-04-16 Thread Cliff Ford
I begin to see the light: with an update method in a class supporting the view I was getting a forbidden attribute error. I am not sure how to deal with that so I have left the update method in the content class but put all code to do with the edit form in the view class. Not quite right becaus

[Zope3-Users] Re: How to test for object metatype

2005-04-15 Thread Cliff Ford
Thanks for the help. I 'discovered' the isinstance method in the ZAPI Reference of your book, which is just what I needed. I put the filter method in the custom content class rather than a separate view class. It all seems to work so I am progressing again. Cliff Philipp von Weitershausen wrote

[Zope3-Users] Re: How to test for object metatype

2005-04-15 Thread Philipp von Weitershausen
Cliff Ford wrote: I have a custom object that uses a page template to make a list of other objects in its containing folder. This so far lists security proxied object instances: Testing Uh, you should use context/__parent__/values... I want to filter the objects by metatype. That does not ex