On Fri, 2003-03-07 at 05:21, Stephan Diehl wrote:
> checkValue(value):
> if (value < 0) or (value > 10):
> doErrorProcessing
> else:
> doSomethingUsefull
> checkValue.callTypes = {'value':'int'}
>
> Wouldn't it make sense to check for my specific "value" on a lower level, say
> providing the "callTypes" a conversion function:
>
> checkValue.callTypes = {'value':'myint'}
Sure, something like this should be possible. However, this isn't
really intended to be a form processor, it's more intended for places
where the HTML forms shouldn't allow incorrect input, like select boxes
and radio fields. There you want verification for security reasons, but
you don't need any user interface. As long as there's no user interface
associated with invalid requests (it would probably just say "There was
an error in your form submission" or somethihng), it doesn't really
matter if you throw the exception in dictCall, or in the body of your
function.
Ian
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss