I've got a situation, the solution which I've used I'm not quite happy
with.  I was wondering if someone else had a thought...

Right now there are at least three ways in which a page can be aborted
-- it can require a login, you can get a permission denied error, or you
can do a redirect.  Since I've started doing stuff in awake(), this
means I have to check in awake() if one of those conditions is true, and
abort immediately.  Then writeContent() or writeHTML has to abort as
well.

I found this awkward to do.  I set two instance variables to tell
whether one of these conditions occurred, so that writeContent or
writeHTML would abort (with a redirect, writeHTML is aborted, but for
login or permission denied, just writeContent is aborted).

Normally, I might use a try:except: to capture these situations, or some
other sort of factoring... but because awake() and respond() are
completely seperate, I don't know how to deal with this.  I can't
optionally call (or not call) respond() from awake().  I really hate
having flag variables, and the logic becomes more and more awkward as I
add more exceptions to SitePage.

So how have other people dealt with this?

  Ian



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to