Am 11.09.2010 um 22:41 schrieb Marius:

>> The idea is not bad but who is going to do this? Hans implemented
>> in mkiv the function to check assignments list of valid keys but
>> this function isn't used because nobody writes the necessary lists
>> which contexts requires to do these checks and the same will happen
>> with the system you suggest.
> 
> Please, point me to the function you are talking about.


The function is implemented in mult-chk.mkiv, here is a example:

\starttext

\startbuffer

\getcheckedparameters[MyTest][MyNamespace][a=1,b=2,c=3,d=4,crap=whatever]

    \MyNamespacea\quad
    \MyNamespaceb\quad
    \MyNamespacec\quad
    \MyNamespaced\quad
    crap is \ifdefined\MyNamespacecrap\else un\fi defined
\stopbuffer

\enablecheckparameters

\setvalidparameterkeys[MyTest][a,b,c,d] \getbuffer \par
\addvalidparameterkeys[MyTest][crap]    \getbuffer \par

\stoptext

As a user you don’t have to care about all the stuff, all you need
is \enablecheckparameters in your document.

Wolfgang
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to