On Thu, 2002-05-02 at 16:38, Tavis Rudd wrote:
> On May 2, 2002 11:16 am, Jeff Johnson wrote:
> > In Page.awake, self._request = transaction.request().  In
> > Cheetah.Servlet.awake, self.request = transaction.request.  I'm not sure
> > if it should but WebKit.Servlet assumes that self._request is defined.
> > Since Cheetah defines self.request instead of self._request,
> > serverSidePath doesn't work from within Cheetah (using inheritance).
> >
> 
> Ahh, you've stumbled across a long-standing bug in webkit that I reported 
> sometime last summer.  WebKit.Servlet assumes that self._request is defined, 
> but neither Servlet nor HTTPServlet define it.  The Page class does.

The "_" at the front of _request should be clue enough that it is part
of a *private* API.  Any code independent of the implementation of Page
that uses it has already been given ample warning that it could go away
some day.

If Cheetah is adding a "request" attribute, then
 1) it is announcing a public interface
 2) it is violating a webware style guide for method and attribute
names. (should be "request(self): return self._request_or_something")
(However, the *intent* of this style guide seems to have been defeated
by the sprinkling of Page._request throughout the code.)

If FormKit relies on Page._request, then FormKit is also broken.

There probably should be a public interface for getting the request for
any servlet.  It probably should not be stored as an attribute in the
servlet, because doing so prevents sharing the servlet among threads. 




_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to