Hi Eric,<br> I have autocomplete working for objects, the way I do it is by looking for .,->,: every time a keystroke is pressed. I then parse the code that comes before the member operator and create a user list on the fly with available information. In my case I'm parsing a dynamic language ( lua ) and I've just resorted to having rules about the names of objects (ugh). <br>
I think some those concepts got integrated into the new QsciAbstractAPIs class <a href="http://www.riverbankcomputing.co.uk/static/Docs/QScintilla2/classQsciAbstractAPIs.html#62a50642b0b058016ed2fdf0922bdee8">http://www.riverbankcomputing.co.uk/static/Docs/QScintilla2/classQsciAbstractAPIs.html#62a50642b0b058016ed2fdf0922bdee8</a><br>
<br> I haven't actually upgraded to qscintilla 2.3 yet. But I'd probably start with the abstract API class.<br><br> Sorta p.s. I don't think you'll find a simple way to determine what type an object
is without either some serious parsing of your code or a language that
supports reflection, even with a programming language that would let
you check what properties a given object has, it's tough to do that
before you compile the code.. <br>
<br>-gedalia<br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 12:40 PM, Eric Fontana <span dir="ltr"><<a href="mailto:eric@carbondesignsystems.com">eric@carbondesignsystems.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p>Well; I've been experimenting with the AutoComplete
(QsciAPIs) api and got</p>
<p>it working, however its not that useful without the next
step;</p>
<p> </p>
<p>I have an embedded QtScript object in my app, I registered a
global</p>
<p>property "Project" to access it from the Script.</p>
<p> </p>
<p>When you type "Project" (dot) "Project."
the autocomplete pops up</p>
<p>and I can select a method name ,that works great.</p>
<p> </p>
<p>Howerver, if a method returns an object, lets say for
example:</p>
<p> </p>
<p>var x = Project.Color;</p>
<p> </p>
<p>If color was a QObject which had a name property I can type<br>
<br>
</p>
<p><a href="http://x.name" target="_blank">x.name</a></p>
<p> </p>
<p>However, since "x" isn't known to the
autocomplete api, it's not known.</p>
<p> </p>
<p>Is there a way to know when "x" is defined "var
x = …" easily?</p>
<p> </p>
<p>I also noticed that the load() method doesn't support
a return type</p>
<p>from the loader file.</p>
<p> </p>
<p>Has anyone done this before?</p>
<p> </p>
<p>Thanks</p>
<p> </p>
<p>Eric</p>
<p> </p>
</div>
</div>
<br>_______________________________________________<br>
QScintilla mailing list<br>
<a href="mailto:QScintilla@riverbankcomputing.com">QScintilla@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/qscintilla" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/qscintilla</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>---------------------------------------------------------------<br>cel: 917.776.8346 AIM: gedaliap<br><a href="http://www.gedalia.net">http://www.gedalia.net</a><br>
---------------------------------------------------------------<br>Fight Entropy!!! Fight Entropy!!! Figth Etnropy! !<br>iFgth Etnrop!y ! giFth tErno!py ! giFt htrEno!p y! --- Well maybe<br>not...<br>