[Zope3-Users] How to manually define an object's provided interfaces?

2006-05-29 Thread Frank Burkhardt
Hi, I'm going to write an alternative implementation of zope.app.file.interfaces.IFile . This implementation will automatically determine the mime type of the data it's containing. I would like to add a method that determines (guesses), if the current file object contains an image...

[Zope3-Users] Re: How to manually define an object's provided interfaces?

2006-05-29 Thread j.kartnaller
Have a look at zope.interface.__init__.py - alsoProvides Jürgen Frank Burkhardt wrote: Hi, On Mon, May 29, 2006 at 01:31:03PM +0200, Lennart Regebro wrote: On 5/29/06, Frank Burkhardt [EMAIL PROTECTED] wrote: I'm going to write an alternative implementation of zope.app.file.interfaces.IFile

Re: [Zope3-Users] How to manually define an object's provided interfaces?

2006-05-29 Thread Lennart Regebro
On 5/29/06, Frank Burkhardt [EMAIL PROTECTED] wrote: Different factories won't help because the user should be able to update the file object's content after ist was created. Yeah, that's what I suspected. I still have the feeling there must be a better way, but I have no answers now. :) I

Re: [Zope3-Users] Re: How to manually define an object's provided interfaces?

2006-05-29 Thread Frank Burkhardt
Hi, On Mon, May 29, 2006 at 02:50:02PM +0200, j.kartnaller wrote: Have a look at zope.interface.__init__.py - alsoProvides That's it - it's working :-) . Thank you, Frank ___ Zope3-users mailing list Zope3-users@zope.org

[Zope3-Users] Call a Python method from a ZPT

2006-05-29 Thread Paolo Cilmo
Hi, i have to call a method of a package from a ZPT. In Zope2, i make the Poll Product (Dev_Guide 2_4). In the example i can call "getVotesFor" method simply writing in ZPT (in ZMI) this line: span tal:replace="python:context.poll1.getVotesFor(j)"/ and it works In Zope3, i made the same

Re: [Zope3-Users] Problem with containment and @@absolut_url

2006-05-29 Thread Garanin Michael
В Пнд, 29/05/2006 в 20:26 +0200, Achim Domma пишет: Hi, I have implemented ArticleFolder and Article like this: class Article(Persistent,Contained): implements(IArticle) title=u'' body=u'' class ArticleFolder(Folder): implements(IArticleFolder) Via ZMI I

RE: [Zope3-Users] Problem with containment and @@absolut_url

2006-05-29 Thread Mats Nordgren
Achim, context/articles would return the id's d = {'one':1, 'two':2} for item in d: ... item ... 'one' 'two' The id is a string which has a title method (capitalize each worlds first letter); this is why your article/title is working. for item in d: ... item.title() ...