Hi everyone.
I need to write a class that will handle several Lists objects in an array
and I have to show or hide them with a show() method, but when I do
DynAPI.document.addChild(list) it gives me this error: "The object doesn't
accept this properity or method.". Some of the code looks like this:
function MultipleList() {
this.lists = [];
}
MultipleList.prototype.add = function(name, items) {
var i;
list = new List();
list.moveTo(100, 100);
list.setWidth(200);
for(i = 0; i < items.length; i++) {
list.add(items[i][0], items[i][1]);
}
this.lists[name] = list;
// This call gives me an error:
// The object doesn't accept this properity or method.
DynAPI.document.addChild(list);
}
MultipleList.prototype.show = function(name, b) {
if(this.lists[name]) {
this.lists[name].show(b);
}
}
l0 = Array(
Array("one", 1),
Array("two", 2),
Array("three", 3),
Array("four", 4)
);
l1 = Array(
Array("uno", 1),
Array("dos", 2),
Array("tres", 3),
Array("cuatro", 4)
);
m = new MultipleList();
m.add("english", l0);
m.add("spanish", l1);
m.show("english", true);
The actual code is like the one in the example of the distribution. What do
you think it is?.
Thanks.
PS: Excuse my bad english.
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help