[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

[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

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