Test for existence of a Ctx buffer by Lua
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
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.