On Mon, Nov 12, 2012 at 11:58:59AM +0100, Marco Pallante wrote: > > 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. >
wouldn't the good old 'package require' command do the work? > 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. I'm not sure I get the picture > > 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. Error messages are unlikely to change and I understand you are trying to infer their meaning from the message but I think it's an approach with many pitfalls and you have just found one of them. I think you should draw on the many introspection capabilities of Tcl in order to have a better insight in what's going on in you application > > 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. this sounds good to me > > 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. > So, why don't you prepare a few web pages on you work? You may open a section on the wiki http://wiki.apache.org/tcl/Rivet and throw in your ideas. I've been working on something Tcl/Rivet oriented in the recent past (I'm working on it right now for an internal project of my employer) but never got to the point where the tool seemed to me ripe for publication. I probably should do something like I've just suggested to you and open up my work for everyone to criticize it My hope is simple, that we can end up having something flexible and light enough to be easily stretched to be reused in the many cases where one needs to create a web interface to some application. I'm probably biased by the fact I've worked on small projects for the web with very dedicated and specific purposes. This is way I used Tcl most of the times. -- Massimo --------------------------------------------------------------------- To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org For additional commands, e-mail: rivet-dev-h...@tcl.apache.org