Yay, more problems! Today i need to set a property of a specific object,
unfortunately I can't get the object because instead I am given a pointer to
a bound method. I've poked around as much as I could, but I can't figure
this one out either.
The object is accessed thus:
Application.ActiveSettings.TextStyle
Application.ActiveSettings returns a pointer to an _Settings object
Here is the _Settings._methods_ entry for the property I want to access:
COMMETHOD([dispid(1610743823), 'propget'], HRESULT, 'TextStyle',
( ['retval', 'out'], POINTER(POINTER(_TextStyle)), 'pVal' )),
Here is the output and the error thrown:
<bound method POINTER(_Settings).TextStyle of <POINTER(_Settings) object
2e2ec60>>
Traceback (most recent call last):
File "G:\files\scripts\table.py", line 109, in <module>
build_table(app, excel)
File "G:\files\scripts\table.py", line 58, in build_table
old_just = style.Justification
AttributeError: 'WinFunctionType' object has no attribute 'Justification'
I'm trying to retrieve the object, but the property can also be set to a new
object if that matters.
Ed Blake
PS: I haven't gotten around to dissecting the latest comtypes sources yet.
I'm not sure I've really gotten ConnectionPoints or whatever yet anyway. I
have something I'd rather be working on, but if I have to spend too much time
on COM I will probably have a look.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
comtypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/comtypes-users