Hi, I have a very strange problem here, driving me nuts: I have a class, derived from PropertyManager (and mixed in to several others instead of PropertyManager); it redefines PropertyMap to allow filtering by prefixes, but mainly adds new methods to work on the properties in a self-written administration interface. As a goodie, it supports the additional property keys 'descr' and 'title'. For them, and because I don't want to affect the ZMI functions, I need the methods 'admin_addProperty' and 'admin_changeProperties'. Problem is, they aren't called properly. As far as possible, I did it like ZMI does. The resulting HTML looks like this (entry fields omotted for clarity): <form action="http://complete.url/of/folderish/object/to/be/changed" method ="post"> (... entry fields for existing properties) <input type="submit" name="admin_changeProperties:method" class="form-element" value="Change" /> </form> (...) <form action=" http://complete.url/of/folderish/object/to/be/changed/admin_addProperty" method="post"> (... entry fields for a new property ...) <input class="form-element" type="submit" name="submit" value=" Add " /> </form> First I tried to define admin_addProperty exactly like manage_addProperty (args: self, id, value, type, REQUEST=None), adding two additional optional arguments at the end. This yields: admin_addProperty() takes at least 4 arguments (3 given) It seems to me that "self, REQUEST, RESPONSE" are handed over, because def admin_addProperty(self, REQUEST=None, RESPONSE=None): raise Exception('request: %s' % `REQUEST.items()`) # debug yields a beautyful REQUEST featuring all I need, BUT: I can't use it. It won't admit it has a get method (AttributeError). What the hell is wrong here? Is it because of a wrong name/prefix? (but I tried manage_admin_... manage_admin... as well, they don't work either) Any ideas? tia, Tobias -- If there is some unfriendly text appended, please ignore it and blame Lotus Notes R5.0.5: Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das un- erlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
THerp@apriori.de wrote at 2003-1-14 15:32 +0100:
... REQUEST without "get" method ... What the hell is wrong here? When I were at your place, I would start to use a debugger.
WingIDE is good (but has a (reasonable) price). If your budget is low, you can use "pdb" (the Python Debugger, part of the Python distribution). There are HowTos on Zope.org on how to debug Zope with "pdb". Dieter
participants (2)
-
Dieter Maurer -
THerp@apriori.de