Object doesn't support this property or method 
Author Message
 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.'.



Mon, 21 Jul 2003 17:21:05 GMT  
 Object doesn't support this property or method
As usual, solved my own problem. Wrong class ID.


Quote:
> 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.'.



Mon, 21 Jul 2003 21:47:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Object doesn't support this property or method : 'DTSGlobalVariables(...).Value.Open

2. Object doesn't support this property or method

3. Object doesn't support this property or method

4. Object doesn't support this property or method

5. Sample code: Object doesn't support this property or method

6. Object doesn't support this property or method

7. Object doesn't support this property or method

8. ASP Error on Session.Contents : Object doesn't support this property or method

9. Object doesn't support this property or method

10. Help!- 438- Object doesn't support this property or method

11. Object doesn't support this property or method

12. Object doesn't support this property or method

 

 
Powered by phpBB® Forum Software