On Mon, Nov 1, 2010 at 12:45 PM, Ville M. Vainio <vivai...@gmail.com> wrote:
> Ok, some thoughts: > > - Ensure that you don't bring all the complicated key handling stuff > with you. Rev 3608 contains relatively slight modes to the existing (complex) key-handling stuff, binds ctrl-space to auto-complete-force, and contains an @button test node in test.leo. For the first time, ctrl-space works well enough to be viable, imo. This concludes what I have been calling the "prototyping" phase. I would appreciate it if you would try out the new code and report an ui issues that bother you. Don't worry too much about speed: we both expect that QCompleter might help with that. > Try to see whether QCompleter does enough on its own, so > that you don't need to deal with backspaces etc. This is a *very* complicated subject. Without going into details, I shall certainly investigate all possible simplifications that QCompleter *might* offer. In particular, the model passed to QCompleter *might* give us both simplicity and speed. The point is this: the present code shows in detail exactly what must (**somehow**) happen. There are many complications **in the design** that must be handled (again somehow) in the QCompleter code. Imo, there is no point in guessing how the new code will turn out--there are way too many details to sort out. In other words, the present code presents a **design target**. The task is to hit that target with the simplest possible code. Imo, we are at the stage where serious experimentation at the code level with QCompleter can now begin. > The important key to > handle is Enter to finally choose a completion. And of course > ctrl+space to trigger the completer. Noted. > - Could you simplify it so that it would only handle simple things > like the ones in defineObjectDict? The present code would not be substantially simpler if it were restricted to just a few objects. That's the beauty of loops :-) > There is tons of complex code in > there that will probably become redundant as we move on to ctags etc. It will certainly change. Whether the complex code will go away is an open question. The point of today's work is to avoid answering such questions for a little while longer. Imo, moving to ctags has the potential to change *everything* behind the scenes. Presumably, the ui would remain the same, or nearly so. Support for QCompleter can probably happen "soon", but moving to ctags almost certainly will not happen until after 4.8 final. > Supporting the simple cases ("live" objects) means that it will be > instant in speed, without any caching. The present speed is good enough, imo. It is certainly good enough for a design target. > - Don't bother with making ctrl+space configurable in leosettings ;-). It would be harder *not* to make it configurable. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-edi...@googlegroups.com. To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.