octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question about variables.h


From: John W. Eaton
Subject: question about variables.h
Date: Thu, 7 Oct 2004 09:52:12 -0400

On  6-Oct-2004, Ian Reinhart Geiser <address@hidden> wrote:

| Greetings,
| I have a question on the function:
| extern string_vector
| generate_struct_completions (const std::string& text, std::string& prefix,
| std::string& hint);
| 
| Am I correct that this will give me the completion hints for the currently
| available variables in the current top_level_sym_tab?

No, I think it just attempts to give you completions for things that
look like structs.  You might want to look at generate_completion,
also in input.cc.  These completion functions are not called directly by
Octave, but by readline, when someone asks for a completion (usually
by typing TAB after entering some text).

| The reason I ask is because im working on code completion in the editor
| and this method looked promising.  The issue I see with it is that I would
| have to have two instances of the octave interpreter running, one for the
| main console, and one for the code completion, syntax error reporter, and
| current functions/variables information for the current editor view.

Completion works on the symbols that are currently in the symbol table
as well as functions that might be found in files, etc.  If you have
two instances of the interpreter, you may not get the right
completions because you would be looking at a different symbol table
from the one that is being used for calculations.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]