Brian Kelley wrote:
[snip]
    def start(self):
        lexer =  self.lexer = QsciLexerPython()
        api = QsciAPIs(lexer)

        # write the API to a file
        self.api = api

you save references to your lexer and api here

[snip]
    def finished(self):
        # save the api to a binary file
        self.api.savePrepared("test.prepared")

        # Shows how to use the prepared API inside Scintilla with a prettier
        #  Python Mode
        editor = self.editor = QsciScintilla()
        editor.show()
        lexer =  QsciLexerPython()
        api = QsciAPIs(lexer)

then (bizarrely) create a new lexer and api here

[snip]
        # uncommenting this exception causes code-completion not to work.
        raise Exception("Why does this exception make code-completion work?")

my guess is that if you hook self.editor up to self.lexer and self.api it will all work fine

-
Regards
Baz Walter
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to