summaryrefslogtreecommitdiff
path: root/tex/context/base/lpdf-fld.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-08-19 17:20:14 +0300
committerMarius <mariausol@gmail.com>2011-08-19 17:20:14 +0300
commitf4c1535ba67d2ee1d5c4ea60a825bb994b6d27c7 (patch)
tree2856c19842b4574165c9c42703b5ac340b1e3c23 /tex/context/base/lpdf-fld.lua
parenta2a3f1ffee783395eaf3c642dd3b6f6107568589 (diff)
downloadcontext-f4c1535ba67d2ee1d5c4ea60a825bb994b6d27c7.tar.gz
beta 2011.08.19 15:44
Diffstat (limited to 'tex/context/base/lpdf-fld.lua')
-rw-r--r--tex/context/base/lpdf-fld.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua
index 1aa1377e5..0b78821b6 100644
--- a/tex/context/base/lpdf-fld.lua
+++ b/tex/context/base/lpdf-fld.lua
@@ -577,11 +577,11 @@ function codeinjections.clonefield(specification) -- obsolete
local p, c, v = specification.parent, specification.children, specification.alternative
if not p or not c then
if trace_fields then
- report_fields("invalid clone: children: '%s', parent '%s', alternative: '%s'",p or "?",c or "?", v or "?")
+ report_fields("invalid clone: children: '%s', parent '%s', alternative: '%s'",c or "?",p or "?", v or "?")
end
return
end
- local x = fields[p]
+ local x = fields[p] or radios[p]
if not x then
if trace_fields then
report_fields("cloning: unknown parent '%s'",p)
@@ -592,11 +592,11 @@ function codeinjections.clonefield(specification) -- obsolete
local f, r, c = fields[n], radios[n], clones[n]
if f or r or c then
if trace_fields then
- report_fields("already cloned: child: '%s', parent '%s', alternative: '%s'",p,n, v or "?")
+ report_fields("already cloned: child: '%s', parent '%s', alternative: '%s'",n,p,v or "?")
end
else
if trace_fields then
- report_fields("cloning: child: '%s', parent '%s', alternative: '%s'",p,n, v or "?")
+ report_fields("cloning: child: '%s', parent '%s', alternative: '%s'",n,p,v or "?")
end
clones[n] = specification
predefinesymbols(specification)
@@ -1033,9 +1033,12 @@ local function makeradiochild(name,specification)
end
makeradioparent(parent,parent)
end
- field = radios[name]
else
field = radios[name]
+ if not field then
+ report_fields("there is some problem with field '%s'",name)
+ return nil
+ end
parent = fields[field.parent]
if not parent.pobj then
if trace_fields then