[Metakit] reading code in from a MK database

Steve Blinkhorn steve at prd.co.uk
Mon Oct 9 19:41:37 CEST 2006


This is not so much a problem as a question regarding elegance in
achieving a goal with Mk4Tcl.

I keep modules of Tcl code (along with other things) in a MetaKit
database.   The main use is to assemble applications from components
to serve up to remote users, which works fine.

But now I find I want to build a tool for manipulating the database,
as part of which I may want to use some of the code *in* the database
- imagine that someone else has added a display component that is one
of many.

One approach is just too clunky for my taste: write to a file, and
source the file.   Another is to eval the code, but I see warning
signals everywhere, though so far this has not caused me a problem.

What would experienced users recommend?   Mostly it's a matter of just
adding extra procedures to be called by a running script, but
sometimes there may be procs in the database with conflicting names.
So I do really want to add new procs chosen on the fly.

This is not exactly an emergency, but it would be nice to find an
elegant idiom for this.   I raise the question here first as homage to
the refined brainpower represented in this mailing list.

--
Steve Blinkhorn <steve at prd.co.uk>


More information about the Metakit mailing list