I have a few questions on auto complete in Lazarus.
- When you are creating a procedure declared in the type definition, how do you get Code completion to copy the parameters as well? Ctrl-Space inserts only the procedure name and ignores the parameters.
You place your cursor on the line with the procedure declaration in the interface part and press ctrl+shift+C it will invoke the autocompletion and create an empty procedure/function in the implementation section, of the unit. The procedure or function declaration can be part of a class or a simple procedure function declared on the interface part of the unit.
There is a way to allow the autocompletion of an inherited method as well, make sure that the autocomplete list is dropped down (this can be done by press ctrl+space in an empty line for example)
select the method name you are interested to override and press enter.
- After a procedure is declared in the header area, is it possible for Code completion to create the main body with begin and end keywords and place the cursor in it, ready for editing. Or vice versa - write the procedure and have the declaration added to the type declaration
look my previous answer I haven't tried the other way around ee from implementation to interface I would say not at this time but try pressing ctrl+Shift+C in a procedure in the implementation section and see if that works.
- There is an example of using a variable, eg assigning it and then using code completion to create the variable in the var section with the write type. Can someone point me to it?
simple do something like
[/list][/list]
procedure Test;
begin
For vC|ntr := 0 to 100 do
end;press ctrl+shift+C and the declaration of an integer variable will appear inside your function.
- When a procedure signature is changed either in the declaration is it possible to get the implementation to change as well or vice versa?
once again place your cursosr anywhere in the declaration line and press ctrl+Shift+C. Just try pressing it in various positions and see how that will affect your code, ctrl+Shift+C is the only shortcut you need to know for now.