Forum > Options
Default section of methods in IDE Options->Code Tools->Class Completion broken?
soerensen3:
The setting "IDE Options->Code Tools->Class Completion->Default section of methods" does not seem to have an effect for me. If I use for example protected and complete the following code it will still create a private section.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---type TTestClass = class //you get this on completion //private // FTest: Integer; // procedure SetTest( AValue: Integer ); public property Test: Integer read FTest write SetTest; // <- Ctrl + Shift + C here end; I know it says "methods" not fields but it does not work for either of them for me. Can anyone confirm this?
Lazarus Version 1.8.2
lainz:
Confirmed on Lazarus trunk svn 58089.
And for both, properties you write on the public section, and methods you write in the implementation section.
Edit: but it works fine for 'OnShow' and that kind of methods created with the Object Inspector. Maybe you can fill a feature request?
Ondrej Pokorny:
The property handlers are not handled with this settings and AFAIK this is wanted.
Thaddy:
Not for public, but published.
soerensen3:
Thanks for your answers.
--- Quote from: lainz on June 14, 2018, 01:28:40 am ---Confirmed on Lazarus trunk svn 58089.
And for both, properties you write on the public section, and methods you write in the implementation section.
Edit: but it works fine for 'OnShow' and that kind of methods created with the Object Inspector. Maybe you can fill a feature request?
--- End quote ---
Oh I didn't know you can use code completion for creating methods. That makes a lot of things easier.
However from the object inspector (Double clicking a method) it does not work with the section which makes no sense to me.
--- Quote from: Ondrej Pokorny on June 14, 2018, 11:01:22 am ---The property handlers are not handled with this settings and AFAIK this is wanted.
--- End quote ---
Why is this wanted? Wouldn't it make sense to have one setting for both properties and methods (including getters and setters of properties) or at least two (Which I don't see any point in, but maybe someone else does).
--- Quote from: Thaddy on June 14, 2018, 12:17:57 pm ---Not for public, but published.
--- End quote ---
Do you mean if I replace the public with published in the above sample it works for you? For me it doesn't!
Navigation
[0] Message Index
[#] Next page