Test for existence of a Ctx buffer by Lua
![](https://secure.gravatar.com/avatar/d6e7462bd4209f9c4cd08271985a50df.jpg?s=120&d=mm&r=g)
Hello, how to test by Lua whether a Ctx buffer exists? --- \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 -- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Procházka Lukáš Ing. - Pontex s. r. o.