
Object doesn't support this property or method
Hi,
I created a COM component using VC++ ATL. One of the interfaces allows to
return a value for pi (3.14159...). It also allows to set the number of
digits to be returned. Instantiation and operation of this COM component
works fine under J++. However I experience some problem when trying to use
the component via VBScript. My knowledge about VBScript is virtually non
existing. But I used a textbook example about the use of objects in
VBScript. Here's what I wrote, a simple HTML content:
<html>
<object classid="clsid:CA128EE2-8E2F-4C77-A8FB-E31105A3D814"
id=objPiCalculator></object>
<body>
<script language="vbscript">
' Set the digits property
objPiCalculator.digits = 5
' Calculate pi
dim pi
pi = objPiCalculator.CalcPi
' Tell the world!
document.write "Pi to " & objPiCalculator.digits & " digits is " & pi
</script>
</body>
</html>
I open this HTML document in Internet Explorer 5.0. Then IE returns an
error: "Object doesn't support this property or method:
'objPiCalculator.digits'". Whatever method I call on the object, IE always
returns that the method in question is not supported.
I suppose this is a trivial problem, but I did not find the solution up to
this moment. So if anyone has any idea about what could be the cause for
this problem, your help would be very much appreciated.
Thanks,
Frederik
Note: when replying to my return address make sure to remove 'NOSPAM.'.