[NTG-context] Test for existence of a Ctx buffer by Lua

Hans Hagen pragma at wxs.nl
Fri Jan 28 16:11:43 CET 2011


On 28-1-2011 3:13, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
> Hello,
>
> how to test by Lua whether a Ctx buffer exists?

\doifelsebuffer

> ---
> \startbuffer[A]
> Aaa aaa
> \stopbuffer
>
> \starttext
> \getbuffer[A]
> Test
> %\getbuffer[NonExisting]
> Vvv
> \stoptext
> ---
>
> To get something like 'context.buffers.A' -> no-nil and
> 'context.buffers.NonExisting' -> nil?
>
> Best regards,
>
> Lukas
>
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list