[Zope-dev] Product Icon
Adrian Hungate
adrian@haqa.co.uk
Sat, 6 Oct 2001 16:22:21 +0100
If I understand what you are trying to do correctly, then all you need is to
have your product's icon property be a method that returns the path to the
correct icon (Like you would normally have the icon property set to). I use
this for a couple of products too.
Something like:
class MyClass(.... normal stuff ...):
""" """
def icon(self):
""" """
if self._i_am_broken_:
return "misc_/MyProduct/MyClassBrokenIcon"
else:
return "misc_/MyProduct/MyClassNotBrokenIcon"
You've got to love python :)
Adrian...
--
Adrian Hungate
Try Zope -
http://www.zope.org
- You might like it.
If you do, try my Zope products -
http://www.zope.org/Members/haqa
- You might like them too!
-----Original Message-----
From: brian.r.brinegar.1 [mailto:brinegar@purdue.edu]
Sent: 05 October 2001 22:05
To: zope-dev@zope.org
Subject: [Zope-dev] Product Icon
I am currently working on a product which has the sole purpose of
referencing other objects. One of the properties is the path to
another Zope object. Then methods are defined like getObject(),
getPath(). We use it as a way to manage news and events that show
on several sites that opperate on our Zope server. It allows one
group to add a news document in their folder and if another group
would like that news item to show on their site they can create a
reference to it.
Anyway, what happens from time to time is an object is referencing
another object when it gets deleted/renamed/moved and that breaks the
reference. The product handles this gracefully, however I would like
to have the icon change from our standard icon to a broken icon.
Any hints?
--Brian Brinegar
ECN Web Technician
MSEE 104 A 494-3106
http://www.geeksoft.net/
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )