I wrote some (minimal) Python scripts for CodeWarrrior 3.0 Pro and today I encountered a weird problem. The following kinda code worked fine before:
codeWarrior = win32com.client.Dispatch("CodeWarrior.CodeWarriorApp")
textEngine = codeWarrior.ActiveDocument.TextEngine
textEngine.InsertText("some new text")</pre>
That ActiveDocument() used to return a object of type <i>ICodeWarriorTextDocument</i>, until I ran Pythonwin's "COM Makepy Utility". Now the returned object always seems to be of type <i>ICodeWarriorDocument</i> and that object doesn't have TextEngine property via which the contents of the document can be modified. I tried removing those files generated by COM Makepy Utility, but it didn't change a thing.
What should I do in order to get that ActiveDocument() return an object of type <i>ICodeWarriorTextDocument</i>? Or is there some other way access the contents of the document that is currently active in CW IDE?