Mr-JosE
02-04-2009, 09:45 AM
Hi Guys,
I am having a problem using a doNetObject in my script. Below is a function i have made to populate a listView with elements from an array. Thanks to Paul for the great listView tutorial from what it is based.
fn loadArrayFromXML theLV theArrayLV theArray newArrayValues=
(
theArray = newArrayValues
theArrayLV = #()
print theArray as string
for i = 1 to theArray.count do
(
ni = dotNetObject "system.windows.forms.listViewItem" theArray[i]
append theArrayLV ni
)
theLV.items.clear()
theLV.items.addRange theArrayLV
)
However, when i run the script i get a runtime error:
MAXScript MacroScript Error Exception: -- Runtime error: No constructor found which matched argument list: system.windows.forms.listViewItem
I am at a loss to explain why it is happening. I have a very similar function using the same object elsewhere in the script that works fine.
Any help would be appreciated.
José
I am having a problem using a doNetObject in my script. Below is a function i have made to populate a listView with elements from an array. Thanks to Paul for the great listView tutorial from what it is based.
fn loadArrayFromXML theLV theArrayLV theArray newArrayValues=
(
theArray = newArrayValues
theArrayLV = #()
print theArray as string
for i = 1 to theArray.count do
(
ni = dotNetObject "system.windows.forms.listViewItem" theArray[i]
append theArrayLV ni
)
theLV.items.clear()
theLV.items.addRange theArrayLV
)
However, when i run the script i get a runtime error:
MAXScript MacroScript Error Exception: -- Runtime error: No constructor found which matched argument list: system.windows.forms.listViewItem
I am at a loss to explain why it is happening. I have a very similar function using the same object elsewhere in the script that works fine.
Any help would be appreciated.
José
