tiziano.fagni
10-02-2005, 03:22 AM
Hi,
sorry for the stupid question but I am new to Laszlo developing...
Suppose I have a method like this:
<method name="test" args="ds">
var el = ds.getElementsByTagName("idActor");
var elem = el[0];
var elem2 = (LzDataText) elem;
var idActor = elem2.data;
.....
</method>
The input variable "ds" is a record inside a dataset that is an instance of LzDataNode object (in particular I think of LzDataElement class)
The compiler give me an error in the type-casting expression (a la Java). Evidently is a Javascript syntax error but, knowing that an object (elem) is of type LzDataText and returned by .getElementsByTagName() method as LzDataNode object, how I can convert it to LzDataText?
Thanks for your help.
Tiziano
sorry for the stupid question but I am new to Laszlo developing...
Suppose I have a method like this:
<method name="test" args="ds">
var el = ds.getElementsByTagName("idActor");
var elem = el[0];
var elem2 = (LzDataText) elem;
var idActor = elem2.data;
.....
</method>
The input variable "ds" is a record inside a dataset that is an instance of LzDataNode object (in particular I think of LzDataElement class)
The compiler give me an error in the type-casting expression (a la Java). Evidently is a Javascript syntax error but, knowing that an object (elem) is of type LzDataText and returned by .getElementsByTagName() method as LzDataNode object, how I can convert it to LzDataText?
Thanks for your help.
Tiziano