[Python.NET] MSScriptControl Objects
Andrew Powell
andrew at shellscape.org
Mon Mar 29 01:02:24 EST 2004
Hello all. Newcommer to the newsgroups so please let me know if Im not
adhering to any policy.
Ive setup an app (.NET app) which is using the MSScriptControl. I have the
ActivePython package installed and the ActiveScript engine for Python
registered. Thats all peachykeen.
Im running into a problem whereby Objects that Ive extended to the script
arent being 'seen' correctly by the engine. Other languages such as
VBScript, JScript and RubyScript are dealing with and using the objects just
fine. The following is an error that the pyscript engine returned upon using
an object ive named 'Graphics'. The following error occurs when I try to use
the methods, properties or subclasses of any object extended to the script
via MSScriptControl.AddObject.
Error Number : -2147352567
Description : Traceback (most recent call last):
File "<Script Block >", line 22, in Widget_Activate
Widget_Paint()
File "<Script Block >", line 36, in Widget_Paint
Graphics.Clear
File
"C:\Python23\Lib\site-packages\win32comext\axscript\client\pyscript.py",
line 146, in __getattr__
return self._scriptItem_.subItems[string.lower(attr)].attributeObject
AttributeError: 'NoneType' object has no attribute 'subItems'
Line 145 Column -1
I would greatly appreciate any feedback on this, and how to get objects
extended to the scripts working in python.
Thanks!
More information about the PythonDotNet
mailing list