Renamed fromTemplate to setFromTemplate.

This commit is contained in:
Markus Lampert
2017-09-13 11:08:54 -07:00
committed by wmayer
parent 1dd18cc970
commit 324dfdd341
4 changed files with 5 additions and 5 deletions

View File

@@ -86,9 +86,9 @@ HighCarbonToolSteel CastAlloy, Ceramics, Diamond, Sialon or Undefined</UserDocu>
<UserDocu>returns a copy of this tool</UserDocu>
</Documentation>
</Methode>
<Methode Name="fromTemplate">
<Methode Name="setFromTemplate">
<Documentation>
<UserDocu>fromTemplate(xmlString|dictionary) ... fills receiver with values from the template string or dictionary</UserDocu>
<UserDocu>setFromTemplate(xmlString|dictionary) ... fills receiver with values from the template string or dictionary</UserDocu>
</Documentation>
</Methode>
<Methode Name="templateAttrs">

View File

@@ -288,7 +288,7 @@ PyObject* ToolPy::copy(PyObject * args)
}
PyObject* ToolPy::fromTemplate(PyObject * args)
PyObject* ToolPy::setFromTemplate(PyObject * args)
{
char *pstr = 0;
PyObject *dict = 0;

View File

@@ -99,7 +99,7 @@ class ToolController:
for t in template.iter(ToolControllerTemplate.Tool):
tool = Path.Tool()
tool.fromTemplate(xml.tostring(t))
tool.setFromTemplate(xml.tostring(t))
obj.Tool = tool
def templateAttrs(self, obj):

View File

@@ -71,7 +71,7 @@ class TestPathTool(PathTestBase):
t0 = self.test00()
t1 = Path.Tool()
t1.fromTemplate(t0.templateAttrs())
t1.setFromTemplate(t0.templateAttrs())
self.assertEqual(t0.Name, t1.Name)
self.assertEqual(t0.ToolType, t1.ToolType)