[Zope-Coders] SimpleItem.getId busted
Casey Duncan
casey at zope.com
Thu Nov 20 11:28:51 EST 2003
On Fri, 21 Nov 2003 02:50:05 +1100
Stuart Bishop <stuart at stuartbishop.net> wrote:
>
> See above. PageTemplateFile inherits Script inherits SimpleItem
> inherits Item, and Item's class definition has id=''. The current code
> thus never gets around to looking for __name__ at all (I think
> PageTemplateFile should be mixing in Item_w__name__ too, but that would
> be
> a seperate bug :-) )
>
> ZopePageTemplate works as it uses self.id instead of self.__name__,
> giving
> the PageTemplates product a split personality.
Actually I think this is the bug. If PTF doesn't use id and inherits from SimpleItem, then its broken. It should inherit from Item_w__name__ (and possibly others). Or, maybe PTF should just use id like everybody else?
Would that fix this? If so it would have a much smaller impact then changing getId which is used by everything.
-Casey
More information about the Zope-Coders
mailing list