**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
return value_node;
}
- // If ValueBase::ident_type() recognises the name, then we know it's a ValueBase
+ // If ValueBase::ident_type() recognizes the name, then we know it's a ValueBase
if(element->get_name()!="canvas" && ValueBase::ident_type(element->get_name()))
{
ValueBase data=parse_value(element,canvas);
continue;
}
- // If we recognise the element name as a
+ // If we recognize the element name as a
// ValueBase, then treat is at one
if(/*(*iter)->get_name()!="canvas" && */ValueBase::ident_type((*iter)->get_name()) && !dynamic_cast<xmlpp::Element*>(*iter)->get_attribute("guid"))
{
if(canvas->value_node_list().placeholder_count())
{
- error(element,strprintf(_("Canvas %s has undefined ValueNodes"),canvas->get_id().c_str()));
+ String nodes;
+ for (ValueNodeList::const_iterator iter = canvas->value_node_list().begin(); iter != canvas->value_node_list().end(); iter++)
+ if(PlaceholderValueNode::Handle::cast_dynamic(*iter))
+ {
+ if (nodes != "") nodes += ", ";
+ nodes += "'" + (*iter)->get_id() + "'";
+ }
+ error(element,strprintf(_("Canvas '%s' has undefined %s: %s"),
+ canvas->get_id().c_str(),
+ canvas->value_node_list().placeholder_count() == 1 ? _("ValueNode") : _("ValueNodes"),
+ nodes.c_str()));
}
return canvas;