STC autocompletion

Stef Mientki wrote:

hello,

I've finally working autocompletion in STC, and it works very nice.
Below is the essential code (several events are involved and a flag is carried around these events).
But I still have a question related to this, where do I get my possible words from for the autocompletion list ?
If I start a new word, I use the keywords from Python itself,
(maybe I'll extend that later with functions from other libraries).
But what if the user entered a point '.' ?
I need to have properties and methods of the "pre-word",
how do I get them ?

Suppose I type

   'test string'.

Now the point '.' triggers an autocompletion list, but what should be in it ?

For now I use, this to generate my list:
       kw = dir ( __name__ )
But maybe I should use
      kw = dir ( 'test string' )
Or ???

And maybe I should even give the user feedback about the type of each item ?

Any suggestions ?

Have a look at the code in wx/py and see how it's done there. If you want live lookup of object and class properties it can get complex, but the info is all there.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!