|
-
Sep 21st, 2001, 05:45 PM
#1
Thread Starter
Addicted Member
Member not found!!?? - NewEnum
Hi,
Here is the scenario:
I have a library called GXDErrorHandler, which has a collection that supports enumeration through For...Each.
Then I have another library called GXDCore, which has an object that "implements" GXDErrorHandler.Errors (the collection).
So, VB shows all the methods of GXDErrH.Errors in GXDCore.Errors for me to implement, including the NewEnum function:
Code:
Private Function Errors_NewEnum() As stdole.IUnknown
Errors_NewEnum = gerrxErrors.NewEnum
End Function
gerrxErrors is a global object variable of type GXDErrH.Errors
But when I try to compile GXDCore (or a start with full compile), I get this error in Errors_NewEnum:
Code:
Compile error:
Member or data member not found
Can anyone help this poor soul?
Thanks in advance.
-
Sep 23rd, 2001, 09:12 AM
#2
Member
You will need to use brackets around the reference to your private collection's NewEnum property(or function).
Additionally, You must use the set command for this to work.
Here is an example:
Code:
Private Property Get IAttributes_NewEnum() As stdole.IUnknown
Set IAttributes_NewEnum = mCol.[_NewEnum]
End Property
Hope this helps!
Regards.
-
Sep 24th, 2001, 01:10 PM
#3
Thread Starter
Addicted Member
Thanks a lot!
I don't know how I forgot the "Set"... Although I don't need to use [_NewEnum] because that gives me the same error, so I just added Set and it now works
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|