Updated 2012-01-22 15:19:43 by dkf

MRS 2005-03-01

This page explains how to add wikit to your script as suggested in Adding Help to Scripted Documents.

Here are the instructions:

Unwrap your application (if you haven't done it yet):
 sdx unwrap app.kit

unwrap a copy of wikit:
 sdx unwrap wikit.kit

copy lib/autoscroll, lib/gbutton and lib/wikit from the wikit .vfs folder to your application lib/ folder
 cp -r wikit.vfs/lib/autoscroll app.vfs/lib/
 cp -r wikit.vfs/lib/gbutton app.vfs/lib/
 cp -r wikit.vfs/lib/wikit app.vfs/lib/

Then follow the instructions of Adding Help to Scripted Documents

This should be enough but, for some reason I don't understand well, some fix is needed. If you just do the steps above, you will have a error message like this:
 can't import command "StreamToHTML": already exists
     while executing
 "namespace import ::Wikit::Format::*"
     (in namespace eval "::Wikit" script line 4)
     invoked from within

 "namespace eval Wikit {


I looked in the source code of wikit, and the problem seems to be that both wikit.tcl and db.tcl make a
 namespace import ::Wikit::Format::*

inside the ::Wikit namespace.

After comenting out this line in db.tcl it seems to work. Until now I haven't noticed any side effects in this workaround, but I'm not sure if this is the best approach. At least it works for me. Interesting is that the wikit.kit works without problems with this code.