General information
Category:
Coding, syntax & commands
Hi Eric.
>I have created a COM object in VFP6.0 that has several properties with
Access/Assign methods. When I use them from inside VFP they work fine. However, when I create the class as a COM object they do not seem to work at all.
This concerned me greatly because I've created a collection class with the same mechanism as you describe -- allowing a character "index" into the collection. However, I hadn't tried this class as a COM object, and when I did, I got the same error you did. Fortunately, after tracking this down a bit, I found the cause of the problem: strings passed to a COM object are terminated with CHR(0), so you have to strip that off before checking to see if that string can be found in your collection. Once I made that change, the COM version worked exactly the same as the VFP version.
Doug
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only