[Lazarus] Code Completion Templates

Donald Ziesig donald at ziesig.org
Tue Feb 12 19:58:15 CET 2013


On 02/12/2013 03:36 AM, Mattias Gaertner wrote:
> On Mon, 11 Feb 2013 21:43:03 -0500
> Donald Ziesig <donald at ziesig.org> wrote:
>
>> [...]
>> Hmmm.  In my code, the XML reader detects, and the IDE writes XML errors
>> to stdout as you say.  I haven't implemented a GUI to generate the XML.
>> (Yet).  Right now, if the author of the XML makes an error, he had
>> better be watching stdout while the XML loads so he can catch the
>> errors.  I will catch the syntax errors with a handler that puts up a
>> message box for now to make them visible to the user.
>>
>> I want to get the snippet generation fully implemented and tested first
>> (it is almost done) before I get fancy with a GUI.
>>
>> Any suggestions will be appreciated.
> There are already several frames about options for codetools.
> Extend an existing one or add a new one.
>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
I extended the TCodetoolsClassCompletionOptionsFrame and added the 
template expander data in TCodeToolsOptions.  I can see the data being 
saved and restored appropriately in codetoolsoptions.xml.

I have spent the whole morning trying to find the route I must use to 
get the data in TCodeToolsOptions (which now contains the path to the 
template file) into my TemplateExpander unit (which is in the uses 
clause of codecompletiontool.pas).

The following code from my TemplateExpander unit fails at compilation:

uses
   CodeToolOptions;

because the compiler can't find the file.

What do I need to do to make that unit visible in my code?  It seems to 
have something to do with packages, but after reading the docs, I still 
don't know where to look.

Thanks,

Don Ziesig





More information about the Lazarus mailing list