Subclasses of Page in methods such as awake(), writeHTML(), etc. have
access to several objects including the transaction, request, response and
We had example code that sometimes accessed them via attributes like
self._request, and at other times via methods like self.request().
Recently Jay improved WebKit to only create session objects on demand, but
this feature requires the use of the method rather than the attribute.
Rather than have people try to remember when to use attributes vs. methods
for these objects, I'm going to encourage coders to always use the methods.
That allows us to add more "intelligence" later without breaking people's code.
Consequently, I updated all of the WebKit examples to do so which is the
CVS update I refer to in the subject.
Note that I often do this in my methods:
req = self.request()
And then use 'req' repeatedly. It saves typing (and I suppose some CPU cycles).
I also do:
wr = self.writeln
P.S. In the future, I think I'll consolidate my "Updates" so people don't
get so many messages.
Get latest updates about Open Source Projects, Conferences and News.