[Zope] adding images (was: Help)

Dieter Maurer dieter@handshake.de
Thu, 1 Nov 2001 19:50:26 +0100


Scott Kuei writes:
 > Do you know how to use the addImage function in Image.py of CMFDefault? The
 > only thing I can use right now is the manage_addImage function, but it doesn't
 > take enough arguments which I need more. And the addImage function came with
 > the CMF is more appropriate for what I am doing right now. But I don't know how
 > to use it, any suggestions? Thank you.
Several, unfortunately not very relevant for your problem.
But for general use....

  1.  Instead of sending your questions to me, it is much better to
      send them to the relevant mailing list. This way, others have
      a chance to help you, too.
      My answer goes also to "zope@zope.org", also your question
      might have been better targeted at "zope-cmf@zope.org".

  2.  I do not know the CMFDefault "addImage" function.
      Of course, I could change this by looking at its code,
      but I am a bit lazy...

      Here, I have just my standard answer. It probably is used
      somewhere in CMFDefault. Find those places and use
      them as examples for your task.

      Almost surely, you can only use the "addImage" function
      inside the CMF environment. You should know that...

  3.  You are not satisfied with "manage_addImage" because you
      would like to pass it additional parameters.
      Now, it has enough arguements to create a standard image.
      If you want to add more meta data, you can
      later (but still in the action that creates the image)
      add properties and give them values.
      
      Zope provides ZClasses to make such things configurable
      (--> Zope book)...
      They allow to give it also new interesting behavior...


Dieter