Renaud AUBIN wrote:
Hi Hans,
The example with clearboxes's crash:
this is probably due to the fact that clearboxes hooks into endfig
\setupoutput[pdftex]
\starttext
\startMPinclusions
input boxes;
\stopMPinclusions
\startuseMPgraphic{my_uml_figure}
input metauml;
Class.A("Point")
("+x: int",
"+y: int") ();
Class.B("Circle")
("radius: int")
("+getRadius(): int",
"+setRadius(r: int):void");
topToBottom(45)(A, B);
drawObjects(A, B);
clink(aggregationUni)(A, B);
\stopuseMPgraphic
\placefigure[here]{none}{\useMPgraphic{my_uml_figure}}
\stoptext
this only works when in boxes.mp, we have:
extra_beginfig := extra_beginfig
& "boxjoin();save pic_,sproc_,pproc_;def clearboxes=enddef;";
extra_endfig := extra_endfig & " clearboxes";
(space added before clearboxes in string)
(maybe i should clean up boxes.mp and preload that in metafun if only i
know what it's meant for)
i suggest that you contact the author of metauml:
- rename the util_* files into metauml_util_* in order to prevent
clashes with other util_* files
- load all files into the main file, so that you get rid of the
redundant file reads (loading quits when the files are already
loaded,but best do some testing before they are input)
- provide a metauml_preload.mp file that preloads e.g. boxes.mp so that
you can do
\startMPinclusions
input metauml_preload;
\stopMPinclusions
\startuseMPgraphic{my_uml_figure}
input metauml;
\stopuseMPgraphic
- provide "load_metauml" that loads once only, so that you can do
\startMPinclusions
input metauml_preload;
\stopMPinclusions
\startuseMPgraphic{my_uml_figure}
load_metauml;
\stopuseMPgraphic
\startuseMPgraphic{my_second_uml_figure}
load_metauml;
\stopuseMPgraphic
and get only one load when you collect graphics instead of runtime
processing
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context