[Lazarus] Ann: class code creation

Jesus Reyes A. jesusrmx at gmail.com
Tue Mar 8 05:41:07 CET 2016

En Mon, 07 Mar 2016 21:21:03 -0600, Ondrej Pokorny <lazarus at kluug.net>  

> I don't think this is possible or reasonable.
> On 08.03.2016 2:39, Dmitry Boyarintsev wrote:
>> procedure TClass.Test(y: integer);
>> begin
>>   x private|:= y;
>> end;
> One problem is that CodeTools need valid syntax in front of y to  
> evaluate the type of y correctly (the type that x gets).
>> Eventually people will know the dialog well, so selecting the needed  
>> item in the dialog might be painful.
> Then we should do some kind of fast select possibility in the dialog.  
>  From my point of view, typing "x private" is more paintful than writing  
> just "x" and then selecting the section with key up/down from the  
> dialog. If you add only private variables, you can make it the default  
> choice (in Options->Code tools->Code creation) and then the dialog  
> doesn't pop-up.
> Ondrej

Some crazy idea:

Detect the shortcut being pressed and then start a timer, if the user  
releases the shortcut before the timer triggers, then the user wants to  
use the previous selection (in this case the private section for example)  
and then no dialog is needed, if there is no previous selection or the  
timer triggers then show the dialog. The timer interval would need to be a  
setting so it can be adjusted by the end user. :)

Jesus Reyes A.

More information about the Lazarus mailing list