[Zope-CMF] Refactored Control Skin Layer

Tres Seaver tseaver@palladion.com
Fri, 01 Jun 2001 09:12:45 -0400


Chris Withers wrote:

> Hi,
> 
> To help me understand the CMF better I've been refactoring :-)
> 
> I've just finished doing the 'Control' skin layer and would be happy to mail
> a .zip of the result to anyone who's interested. Mainly changed a lot of
> DTML methods into PythonScripts which cut down their size a lot and made
> them much easier to read...
> 
> While doing this, I solved the problem that if errors occurred during
> copy/paste/undo/etc, you would get the standard zope error message dialog
> and then get redirected to the management interface.
> Sadly, because CopySupport throws sucky string exceptions (and PythonScripts
> don't have access to any other exceptions so they can be caught :-S), the
> best I could do was to catch all exception and return a very general error
> message in portal_status_message.
> 
> Let me know if you want a copy, I'd be muchly chuffed if this could work its
> way into the release :-)


Hmm, I just last night checked in fixes to the "clipboard" methods so that
they both check for the required REQUEST values ('ids' or '__cp') and return
an appropriate 'portal_status_message' to the user if they aren't found.
This still doesn't deal with the "permission validation" exceptions from
CopySupport, but it does prevent 90%+ of the "clipboard tracebacks" I've 
seen.
I'll look at folding your stuff in with this;  please upload a tarball to
the dogbowl, and send a link.

Tres.