[ZCM] [ZC] 761/ 1 Request "Python Product Object not being accessable through acquisition"
Collector: Zope Bugs, Features, and Patches ...
zope-coders-admin@zope.org
Wed, 08 Jan 2003 20:29:58 -0500
Issue #761 Update (Request) "Python Product Object not being accessable through acquisition"
Status Pending, Zope/bug low
To followup, visit:
http://collector.zope.org/Zope/761
==============================================================
= Request - Entry #1 by Anonymous User on Jan 8, 2003 8:29 pm
Python Product Object not being accessable through acquisition
This is a tips for all developers that might run into this problem, it can save you allot of hours trying to figure out.
Problem:
Python Product objects can't be accessed (not found) when accessed from DTML (or probably others objects as well).
Solution:
I noticed this when implementing a new class [EasyPropertyContainer] (inheriting from a previous base class [EasySyncAware]).
I tracked it down to one single method in my EasySyncAware and noticed
that I mispelled 'declarePrivate' with 'declareProtected'.
I had written:
security.declareProtected('doSyncronize')
where i meant:
security.declarePrivate('doSyncronize')
Because declareProtected really take two arguments (permission, method name)
I suppose something went wrong when the class was initilized.
The result was surely suprising.
This should be by the InitializeClass() should report
misformed security declarations.
==============================================================