[Zope] Icons not set right after Subclassing
VanL
vlindberg@verio.net
Wed, 31 Jul 2002 11:43:13 -0600
Hello,
I have a Folderish Class "GenericHost".
I then have some specializations of this host, declared as
SpecialHost(GenericHost):
(Differences here)
SpecialHost2(GenericHost):
(Differences)
I then declare them in __init__ as follows:
context.registerClass(
Hosts.SpecialHost,
constructors = (Hosts.addSpecialHostForm,
Hosts.manage_addSpecialHost),
icon = 'icons/SpecialHost.gif'
)
context.registerClass(
Hosts.SpecialHost2,
constructors = (Hosts.addSpecialHost2Form,
Hosts.manage_addSpecialHost2),
icon = 'icons/SpecialHost2.gif'
)
GenericHost is never registered. However, the icon directive is
ignored; they all get a plain folder icon.
When I do register GenericHost and give it its own icon, then everything
then gets the GenericHost icon. Otherwise, everything works as expected.
I've tried the misc_ trick, but I can't get it to work. Can anyone tell
me what I'm doing wrong? It seems like a waste to repeat all of the
code just for the icons.
TIA,
VL