Am 30.12.2005 um 19:19 schrieb Gustaf Neumann:
how will be the call, when
ns_register_filter preauth GET /junk myfilter
is registered? when
myfilter preauth
Like this.
is called, this would be pretty much comaptible with the aolserver
for the simple cases.
this would as well work with xotcl methods in this case. however,
this would as well be
the case, when WHY is placed before the passed arguments.
the hyperflexible approach would be to use
ns_register_filter preauth GET /junk [list myfilter arg1] arg2 arg3
I do not understan why bother with all this arguments (arg2 arg3, etc)
when you can easily construct the script using the [list] command?
In most of the callbacks I use (or have made in our C-code) I revert
to a single callback script line which must be prepared by the caller,
then registered. The C-implementation would then ADD arguments to it.
which means, cmd as you suggested, appending optional arguments.
this means
ns_register_filter preauth GET /junk myfilter arg2 arg3
Again, I'd revert to:
ns_register_filter preauth GET /junk myfilter
and if you need to pass arguments to "myfilter" just use
ns_register_filter preauth GET /junk [list myfilter $arg1 $arg2
$arg3]
Would this be less flexible? I think not.
Cheers
Zoran