Recent

Author Topic: Another Synedit question  (Read 4056 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Another Synedit question
« on: October 05, 2012, 10:18:17 pm »
I am trying to implement schema completion for a query editor I am working on (original version was in Delphi using that synedit)

Anyway I need the completion component to activate when the user types the name of a database schema and a . (dot)
in the drop down I then will display all the schema objects for that schema, i.e. tables, functions, etc

I can't see a way to activate the completion on a . (dot)  Am I just missing it?  I looked at the completion demos but nothing there on activating on a .
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Another Synedit question
« Reply #1 on: October 05, 2012, 10:32:12 pm »
The IDE does in in ide/SourceEditor.pp (line 3050...), look for SourceCompletionTimer
Because the IDE waits a moment after the "." was pressed, so it needs the timer.


But yes there is no opening on ".". You have to hook
  SynEdit.OnProcessCommand
look for ecChar and trigger it yourself

--
Related, though not an answer: http://wiki.lazarus.freepascal.org/SynEdit#.28Auto-.29Completion

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Another Synedit question
« Reply #2 on: October 05, 2012, 11:19:17 pm »
Thanks,
I looked at the IDE editor and it's kind of difficult to follow.  I may have to switch to that Synedit 2.x port that is available.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018