[QScintilla] Object type-sensitive Scintilla prompts

Gedalia Pasternak gedalia at gmail.com
Sun Mar 25 03:29:28 BST 2012


Hi Jack,
  I've actually done this with lua... googling "gedalia lua autocomplete"
will get you a few emails that I wrote to the list over the years. I've
used qscintilla as the editing component for a game AI IDE.  I don't use
the qsciapi much. My solution has been to parse the current line as the
user types and present a dynamically created user list (it's part of the
qscintilla api). lua isn't strongly typed either but I've found that by
sticking to an established naming convention for variables, like all
Character objects start with "character_" I can guess the class API to use
and ask SWIG for a list of member functions based on the class type. If an
object is a global you can also ask the lua interpreter what it is. It's
not a general purpose solution and it took a long time to implement but it
handled 90% of what I needed.

-gedalia

On Sat, Mar 24, 2012 at 5:22 PM, Jack Cosgrove <jackcosgrove at gmail.com>wrote:

> Just a quick question:
>
> Since Python is not strongly typed it isn't possible to filter the
> methods available in a Scintilla prompt based upon the object type,
> right? So upon typing the '.' operator for an object of type MyClass,
> you cannot immediately be presented with MyMethod1(), MyMethod2() simply
> because those are methods of class MyClass? Even if you were to keep
> track of variable names and types, objects of different types can have
> the same name at different times in a program.
>
> _______________________________________________
> QScintilla mailing list
> QScintilla at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/qscintilla
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20120324/78d5969e/attachment.html>


More information about the QScintilla mailing list