| geronimo 2004-09-23, 9:18 am |
| Hi,
When I loop through a resource gallery and try to get the resources in it, I
get a strange error:
[COMException (0x80020008): Bad variable type.]
Microsoft.ContentManagement.Interop.Publishing.IRcwResources.get_Item(Object
index) +0
Microsoft.ContentManagement.Publishing.ResourceCollection.get_Item(Int32
index) +60
[CmsServerException: Bad variable type.]
Microsoft.ContentManagement.Publishing.ResourceCollection.get_Item(Int32
index) +90
the code looks like this;
[start snippet]
Dim rGallery As ResourceGallery
Dim mCol As ResourceCollection
Dim theResource As Resource
Dim i As Integer
'...get the resource gallery
If Not rGallery Is Nothing Then
mCol = rGallery.Resources
For i = 0 To mCol.Count - 1
theResource = mCol.Item(i) 'error!!
Next i
End If
[end snippet]
I get the error on the mCol.getItem(i) statement
Shouldn't this work like that? Or am I doing something wrong here?
Env: Win2k3, MCms2002sp1a
Geronimo
|