Hi,
I believe a parameterless propget doesn't work as it should. Consider
the following interfaces:
interface IObject2: IDispatch
{
[id(1), propput] HRESULT AttValue ( [in] BSTR attr, [in] VARIANT newVal);
[id(1), propget] HRESULT AttValue ( [in] BSTR attr, [out,
retval] VARIANT *pVal);
};
interface IObject1: IDispatch
{
[id(1), propget] HRESULT Object2( [out, retval] IObject2** obj2)
};
The propput method of the object returned from IObject1 cannot be used.
obj1.Object2.SetAttValue("TEST", 123)
propget works:
obj1.Object2.AttValue("TEST")
In my gen_cache directory, there is code for IObject1, but no code for IObject2.
If I use the makepy utility, the generated code seems complete. There
is code generated for IObject2 and also for the parameterless
propput-wrapper for IObject1.
If I add a dummy parameter to the Object2 method of IObject1 everything works:
interface IObject1: IDispatch
{
[id(1), propget] HRESULT Object2( [in] VARIANT dummy, [out,
retval] IObject2** obj2)
};
obj1.Object2(999).SetAttValue("TEST", 123)
With this workaround, there is Python code generated for IObject2 too.
The ActiveScript engine has added a registered TypeLib with
AddTypeLib. The code works with VBScript, and considering the
workaround, I believe the problem is somewhere in Python / COM.
--
/Johan.
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32