[ZPatterns] Why is class_default_for_ method unbound?
Itai Tavor
[email protected]
Tue, 21 Aug 2001 12:10:30 +1000
--============_-1213762655==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
I got the following DataSkin class (Zope 2.3.2, ZPatterns 0.4.3p1):
class MyClass(DataSkin):
def class_default_for_method1(self, REQUEST):
""" Display something """
...
Calling http://mysite/myinstance/method1 returns:
Error Type: TypeError
Error Value: unbound Python method must be called with MyClass 1st argument
Why is method1 unbound? Why does it behave any different than a
method defined as def method1(self, REQUEST)? And what do I do to
make this method work?
--
--
Itai Tavor -- "Je sautille, donc je suis." --
[email protected] -- - Kermit the Frog --
-- --
-- "If you haven't got your health, you haven't got anything" --
--============_-1213762655==_ma============
Content-Type: text/html; charset="us-ascii"
<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Why is class_default_for_ method
unbound?</title></head><body>
<div>I got the following DataSkin class (Zope 2.3.2, ZPatterns
0.4.3p1):</div>
<div><br></div>
<div>class MyClass(DataSkin):</div>
<div><br></div>
<div> def class_default_for_method1(self,
REQUEST):</div>
<div> """
Display something """</div>
<div> ...</div>
<div><br></div>
<div>Calling http://mysite/myinstance/method1 returns:</div>
<div><br></div>
<div>Error Type: TypeError</div>
<div>Error Value: unbound Python method must be called with MyClass
1st argument</div>
<div><br></div>
<div>Why is method1 unbound? Why does it behave any different than a
method defined as def method1(self, REQUEST)? And what do I do to make
this method work?</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div>--<br>
Itai
Tavor <span
></span>
-- "Je sautille, donc je suis." --<br>
[email protected] <span
></span>
-- <span
></span> - Kermit the Frog --<br>
-- <span
></span
> <span
></span
> <span
></span
> <span
></span
> <span
></span> --<br>
-- "If you haven't got your health, you haven't got
anything" --<br>
</div>
</body>
</html>
--============_-1213762655==_ma============--