> I think so. ErrorScript is handled by RivetUserConf directives and they work
> in .htaccess if this method is enabled. So try using this configuration
>
> RivetUserConf ErrorScript "...:"
>
> and let us know

It works, so as BeforeScript and then I think every directive regarding request
handling (After/Abort/AfterEveryScript), even if I've not tested.

I don't know if it's the right way to follow. See after.

>> [...] I'm trying to reproduce the
>> basic features of PHP frameworks, such as CodeIgniter or CakePHP, using
>> Tcl and Rivet [...]
>
>
> very interesting. Again let us know about it.

Indeed. I'm putting some details about the project at the end of the message.

What I'm trying to get an autoloading facility for framework subsystems. If a
subsystem is identified by a namespace, I don't want to do things like

    load_subsys Log
    load_subsys Config
    ...
    ::Log::this foo
    ::Config::that bar

where load_subsys is a proc which takes a subsystem name, finds the right
file containing its code and "parse" or "source" it.

I'd like to make a very user friendly

    ::Log::this foo
    ::Config::that bar

where you just use what you need. That's why I need to do "unknown" magic:
the unknown proc becomes the place where the former load_subsys is
implemented in a way transparent to the user.

Of course, there are chances the user really called a non existing procedure,
or asked for an unknown subsystem, in which case the original ::unknown
must be executed.

Error reporting is the last part and maybe changing it using the ErrorScript
directive should be done, but still the $errorInfo variable has a unexpected
value in it.

Marco

PS. Details about the framework project

Now that I'm unemployed, I'm getting back into web development and
I'm starting collaborating with an agency in my town. They use PHP, which
is quite a winner, but I've never liked it so much, at least not since
I discovered
Tcl, many years ago.

I'm thinking about a couple of personal web-based project which I'd like to work
on soon, thanks to the spare time I have, and I asket myself "Why not Tcl,
instead of PHP?"

Unfortunately, while PHP (and Python, Ruby, .Net, Java, even Perl) has its
frameworks to speed up web development and reduce time to market, Tcl
has nothing to offer.

Because the projects are mine, and don't have a stict schedule, I've been
thinking about a framework for Tcl and Rivet, so to speed up my following
development and maybe giving a nice and easy starting point for those who
want to use Tcl, like me.

A couple of weeks ago, I partially rewrote some of the CodeIgniter core
features in Tcl just to see what happens, and results where promising, but
the code was a sort of PHP with different syntax. Since then I decided to
restart from scratch to take advantage from peculiar Rivet features, and make
the code a little more Tcl-ish.

The project is really at the beginning and I'm exploring some ideas which
should form the core part of the framework, such as the autoloading facilities.
If you're interested in it, I could report the status here.

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to