|
EControl Ltd. VCL libraries and software support forum
|
View previous topic :: View next topic |
Author |
Message |
ulrikj
Joined: 07 Aug 2006 Posts: 12
|
Posted: Mon Aug 14, 2006 1:34 pm Post subject: TParamCompletion problem |
|
|
Hi,
I'm currently evaluating your editor for use in my company. Great work!
We've run into a few problems though, when trying to add some parameter-completion-facilities to the editor (using the VBScript-lexer), I'm sometimes seeing the following situation:
1. I load up a VBScript editor with parameter-completion
2. I write some subs and some functions (why are functions not real code-blocks, in the same manner that subs are in the lexer?)
3. I test my autocompletion, everything is working,
4. I write the following code
---------------------------
Code: | Sub Start()
End Sub
| ---------------------------
And now I go to add the contents, by writing the middle line:
---------------------------
Code: | Sub Start()
Start((
End Sub
|
Now, since my param-completion hooks up to '(', I get the appropriate response after typing the first parenthesis. However, when I type the second one I'm experiencing that my OnGetParamComps eventhandler is being called repeatedly again and again, until a stack-overflow exception occurs at some point! It goes into my eventhandler, then back into ecPopupCtrl.pas and then returns to rerun my eventhandler.. infinitely, it seems.
Do you have any idea why this is?
Also, I saw there was an incremental search function in the main demo, but I haven't been able to find/activate it myself. What should I be looking for?
Best Regards,
Ulrik Jensen |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Tue Aug 15, 2006 12:20 pm Post subject: |
|
|
Problem with parameter-completion had been already fixed in one of the previous update (after 2.20).
Incremental search:
Methods:
// Starts incremental search
procedure IncSearchStart(FromPos: integer = -1);
// Stops incremental search
procedure IncSearchStop;
Properties:
// Current search string
property IncSearchStr: ecString;
// Search direction
property IncSearchBack: Boolean;
// Ignore case or not
property IncSearchIgnoreCase: Boolean;
Event:
// Controls incremental search process
property OnIncSearchChange: TIncSearchChangeEvent
Command:
// starts incremental search from the caret position
smIncrementalSearch
Example:
Code: | procedure TSyntEditMain.SyntaxMemo1IncSearchChange(Sender: TObject;
State: TIncSearchState);
begin
if State = isStart then
with Sender as TSyntaxMemo do
begin // initialize direction and case sensitivity from the serach dialog
IncSearchBack := ftBackward in SyntFindDialog1.Flags;
IncSearchIgnoreCase := not (ftCaseSensitive in SyntFindDialog1.Flags);
end;
if State <> isStop then
SB.SimpleText := 'Search for: ' + (Sender as TSyntaxMemo).IncSearchStr
else
SB.SimpleText := '';
SB.SimplePanel := State <> isStop;
end; |
Michael. |
|
Back to top |
|
|
ulrikj
Joined: 07 Aug 2006 Posts: 12
|
Posted: Wed Aug 30, 2006 11:33 am Post subject: Still problems with paramcompletions |
|
|
Hello Michael,
Having just downloaded and reinstalled the editor, I've noticed that the parameter-completion bug still exists. Will this update be included only later, or is this something we will receive access to when we license your product?
Wrt. to the incremental search, thank you very much! I noticed shortly after posting that I needed to nothing to activate the forward incremental search, Ctrl-E was already bound to it.
This really seems like a great product. Another issues I've run into though, is that the VBScript syntax lexer is not very complete. It regards procedures as more important than functions (and thus doesn't provide folding for functions), and f.ex. Option Explicit isn't highlighted. Also, I've noticed that when editing source-code where the first line of code is "Sub ...", the procedure will not be recognized as a proper procedure (no folding+no borderlines+no background colors). I've been unable to figure out why this is, or solve it for that matter.
Best regards, |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Sun Sep 03, 2006 8:34 am Post subject: |
|
|
If you reinstalled trial there is no changes, because trial is still of ver 2.20. Current version is 2.26 (I can not repeat this bug in current version, but I remember that such bug presented in one of prior versions), version 2.27 is in development.
Lexers in default lexer library are only samples. They may be improved for any particular task.
Problem with first Sub is fixed.
Pair of rules
Code: | 1. end func = "sub,function"
"end" ("Cancel next rules" = True)
2. function = "sub,function" (end rule = "end func") |
Michael. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|