Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2003
    Olutensin, Finlandia Vodka

    CodeWarrior COM problems (Python)


    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:

    <pre>import win32con
    import win32com.client

    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?

    Any help is greatly appreciated.



  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2004
    Austin, TX USA

    For non-Symbian-specific CodeWarrior questions like this you'll need to contact Metrowerks support; they maintain the IDE code and will be able to help you.

    They can be reached here:



    Matt Pinsonneault
    Nokia Developer Support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts